List of usage examples for java.lang Object Object
@HotSpotIntrinsicCandidate
public Object()
From source file:de.codecentric.batch.metrics.BatchMetricsImpl.java
public BatchMetricsImpl() { this.serviceKey = new Object(); this.metricContainer = new ThreadLocal<MetricContainer>(); }
From source file:org.springmodules.jcr.jackrabbit.AcegiTests.java
protected void onSetUpBeforeTransaction() throws Exception { SecurityContextHolder.getContext().setAuthentication( new TestingAuthenticationToken(new Object(), new Object(), new GrantedAuthority[] {})); }
From source file:org.iterx.miru.spring.beans.TestSpringBeanWrapper.java
public void testConstructors() { SpringBeanWrapper beanWrapper;// www.j a v a2s.c o m beanWrapper = new SpringBeanWrapper(beanFactory.assignBeanWrapper(new Object())); assertNotNull(beanWrapper); try { beanWrapper = new SpringBeanWrapper(null); fail("SpringBeanWrapper initialised with null arguments"); } catch (IllegalArgumentException e) { } }
From source file:net.sf.morph2.transform.copiers.dsl.MultiMappedTestCase.java
/** * {@inheritDoc}/*from w w w . ja va 2 s . c o m*/ * @see net.sf.morph2.transform.converters.BaseConverterTestCase#createValidPairs() */ public List createValidPairs() throws Exception { ArrayList l = new ArrayList(); A a = new A(); B b = new B(); a.setFoo("foo"); a.setBar(600); a.setBaz(new Object()); a.setStringA("string"); a.setIntA(300); a.setObjectA("IGNORED"); b.setFoo(new char[] { 'f', 'o', 'o' }); b.setBar("600"); b.setBaz(a.getBaz()); b.setStringB("string"); b.setIntB(300); b.setObjectB("string"); l.add(new ConvertedSourcePair(b, a)); a = new A(); b = new B(); a.setFoo("foo"); a.setBar(600); a.setBaz(new Object()); a.setStringA("string"); a.setIntA(300); a.setObjectA("string"); b.setFoo(new char[] { 'f', 'o', 'o' }); b.setBar("600"); b.setBaz(a.getBaz()); b.setStringB("string"); b.setIntB(300); b.setObjectB("IGNORED"); l.add(new ConvertedSourcePair(a, b)); a = new A(); b = new B(); b.setBar("0"); l.add(new ConvertedSourcePair(a, b)); l.add(new ConvertedSourcePair(b, a)); a = new A(); b = new B(); a.setFoo("foo"); a.setBar(600); a.setBaz(new Object()); a.setStringA("string"); a.setIntA(300); a.setObjectA("string"); a.setTestClass(TestClass.getEmptyObject()); b.setFoo(new char[] { 'f', 'o', 'o' }); b.setBar("600"); b.setBaz(a.getBaz()); b.setStringB("string"); b.setIntB(300); b.setObjectB("IGNORED"); b.setMap(TestClass.getEmptyMap()); l.add(new ConvertedSourcePair(a, b)); a = new A(); b = new B(); a.setFoo("foo"); a.setBar(600); a.setBaz(new Object()); a.setStringA("string"); a.setIntA(300); a.setObjectA("IGNORED"); a.setTestClass(TestClass.getFullObject()); b.setFoo(new char[] { 'f', 'o', 'o' }); b.setBar("600"); b.setBaz(a.getBaz()); b.setStringB("string"); b.setIntB(300); b.setObjectB("string"); b.setMap(TestClass.getFullMap()); l.add(new ConvertedSourcePair(b, a)); return l; }
From source file:com.qrmedia.commons.collections.PairUtilsTest.java
@Test public void toPairSetsSecondObject() { Object obj = new Object(); assertEquals(obj, PairUtils.toPair(null, obj).getSecondObject()); }
From source file:TreeUtil.java
public TreeUtil(String name) { itsMap.put(name, new Object()); itsRootNode = new DefaultMutableTreeNode(name); itsTreeMap.put(name, itsRootNode); }
From source file:com.github.danzx.zekke.domain.WaypointTest.java
@Test public void shouldEqualsBeFalseWhenComparingWithDifferentObject() { assertThat(TEST_WAYPOINT.equals(new Object())).isFalse(); }
From source file:org.apache.mina.springrpc.MinaClientInterceptorTest.java
@Test public final void invokeCorrectly() throws Throwable { Object expected = new Object(); MethodInvocation methodInvocation = EasyMock.createMock(MethodInvocation.class); Method method = Object.class.getMethod("hashCode", new Class[] {}); EasyMock.expect(methodInvocation.getMethod()).andReturn(method).anyTimes(); Object[] arguments = new Object[] {}; EasyMock.expect(methodInvocation.getArguments()).andReturn(arguments).anyTimes(); MinaRequestExecutor minaRequestExecutor = EasyMock.createMock(MinaRequestExecutor.class); ReturnAddress returnAddress = new UniqueStringReturnAddress(); ReturnAddressAwareRemoteInvocationResult result = new ReturnAddressAwareRemoteInvocationResult( returnAddress, expected);//from w w w . j a va 2 s . c om EasyMock.expect( minaRequestExecutor.executeRequest((ReturnAddressAwareRemoteInvocation) EasyMock.anyObject())) .andReturn(result); Object[] mocks = new Object[] { methodInvocation, minaRequestExecutor }; EasyMock.replay(mocks); MinaClientInterceptor interceptor = new MinaClientInterceptor(); interceptor.setServiceUrl("tcp://localhost:8012"); interceptor.setMinaRequestExecutor(minaRequestExecutor); interceptor.afterPropertiesSet(); Object actual = interceptor.invoke(methodInvocation); assertEquals(expected, actual); EasyMock.verify(mocks); }
From source file:org.ujorm.orm.support.UjormTransactionManager.java
@Override protected Object doGetTransaction() throws TransactionException { LOGGER.log(UjoLogger.INFO, "getTransaction returning new Object"); //can not return null because it will not call commit return new Object(); }
From source file:com.job.portal.dao.UserDetailsDAO.java
public JSONObject getUserById(long id) { JSONObject ud = null;/*from w w w. j ava 2 s .com*/ try { String query = "select userId,dob,email,gender,joined,name," + "phone,pwdHash,role,salt " + "from user_details where userId=?"; Object arr[] = new Object[1]; arr[0] = id; ud = fetchOne(query, arr); } catch (Exception e) { LogOut.log.error("In " + new Object() { }.getClass().getEnclosingClass().getName() + "." + new Object() { }.getClass().getEnclosingMethod().getName() + " " + e); } finally { return ud; } }