List of usage examples for java.lang Object Object
@HotSpotIntrinsicCandidate
public Object()
From source file:org.eclipse.virgo.snaps.core.internal.SnapFactoryMonitorTests.java
@Test public void testNonHostService() { SnapFactory factory = createMock(SnapFactory.class); publishFactory(factory, "travel", "[1.0, 2.0)"); replay(factory);//w w w . j a v a 2 s . c o m getBundleContext().registerService(Object.class.getName(), new Object(), null); verify(factory); }
From source file:net.cpollet.jixture.fixtures.TestMappingFixture.java
@Test public void entityPassesFilterReturnsTrueWhenEntityDoesNotPassFilter() { // GIVEN//from w w w. j ava2s . c o m MappingFixture mappingFixture = new MappingFixture(); mappingFixture.setFilter(new Filter() { @Override public boolean filter(Object entity) { return true; } }); // WHEN boolean actualValue = mappingFixture.filter(new Object()); // THEN assertThat(actualValue).isTrue(); }
From source file:net.cpollet.jixture.fixtures.loaders.TestSimpleFixtureLoader.java
private ObjectFixture getLoadableFixture() { return new BaseObjectFixture() { Object object = new Object(); @Override/*from w w w.ja v a 2s . co m*/ public Fixture addObjects(Object... objects) { return this; } @Override public List<Object> getObjects() { return Arrays.asList(object); } }; }
From source file:com.redhat.lightblue.metadata.types.BooleanTypeTest.java
@Test public void testCompareV2Null() { assertEquals(booleanType.compare(new Object(), null), 1); }
From source file:net.projectmonkey.spring.acl.enhancement.identity.strategy.method.DefaultMethodInvocationObjectIdRetrievalStrategyTest.java
@Test public void nullReturnedWhenNoMatchingParamsExistUsingProcessDomainObjectClass() throws SecurityException, NoSuchMethodException { stubMethodInvocation("methodWithNoSecuredAgainstAndNoMatchingParams", new Class<?>[] { Object.class, Object.class }, new Object(), new Object()); underTest.setProcessDomainObjectClass(TestClass.class); ObjectIdentity returned = underTest.getObjectIdentity(invocation); assertNull(returned);//w ww. j a va2 s.c o m }
From source file:com.thoughtworks.go.server.cache.GoCacheIntegrationTest.java
@Test public void put_shouldNotUpdateCacheWhenInTransaction() { transactionTemplate.execute(new TransactionCallbackWithoutResult() { @Override// w w w .j a va2 s . c o m protected void doInTransactionWithoutResult(TransactionStatus status) { Object o = new Object(); goCache.put("someKey", o); } }); assertNull(goCache.get("someKey")); }
From source file:edu.illinois.imunit.examples.apache.collections.TestBlockingBuffer.java
/** * Tests {@link BlockingBuffer#remove()} in combination with {@link BlockingBuffer#add(Object)}. *///ww w .j a va 2s.c o m @Test @Schedule("[beforeRemove]@main->beforeAdd@addThread") public void testRemoveWithAdd() { Buffer blockingBuffer = BlockingBuffer.decorate(new MyBuffer()); Object obj = new Object(); new NonDelayedAdd(blockingBuffer, obj, "addThread").start(); // verify does not throw BufferUnderflowException; should block until other thread has added to the buffer . fireEvent("beforeRemove"); assertSame(obj, blockingBuffer.remove()); fireEvent("afterRemove"); }
From source file:com.flexive.war.filter.JsonRpcFilter.java
/** * Initialize the JSON/RPC bridge, if not present. * * @param session the current user's session * @return the JSON/RPC bridge with all registered objects */// www . ja v a 2s . c om public static JSONRPCBridge getJsonBridge(HttpSession session) { final JSONRPCBridge bridge = getJsonRpcBridge(session, true); try { if (bridge.lookupObject(JSON_RPC_MARKER) != null) { return bridge; } // register our backend JSON/RPC beans synchronized (JSON_RPC_LOCK) { if (bridge.lookupObject(JSON_RPC_MARKER) != null) { // initialized while waiting for the lock return bridge; } bridge.registerObject("StructureTreeWriter", new StructureTreeWriter()); bridge.registerObject("StructureTreeEditor", new StructureTreeEditor()); bridge.registerObject("ContentTreeWriter", new ContentTreeWriter()); bridge.registerObject("ContentTreeEditor", new ContentTreeEditor()); bridge.registerObject("ContentEditor", new ContentEditor()); bridge.registerObject("BriefcaseEditor", new BriefcaseEditor()); bridge.registerObject("SearchQueryEditor", new SearchQueryEditor()); bridge.registerObject("SystemInformation", new SystemInformation()); bridge.registerObject(JSON_RPC_MARKER, new Object()); setJsonRpcBridge(session, bridge); return bridge; } } catch (Exception e) { if (LOG.isErrorEnabled()) { LOG.error("Failed to register backend JSON/RPC calls: " + e.getMessage(), e); } return bridge; } }
From source file:com.github.dozermapper.core.DozerBeanMapperTest.java
@Test public void shouldSetEventListeners() { EventListener listener = mock(EventListener.class); Mapper beanMapper = DozerBeanMapperBuilder.create().withEventListener(listener).build(); beanMapper.map(new Object(), new Object()); verify(listener).onMappingStarted(any()); verify(listener).onMappingFinished(any()); verifyNoMoreInteractions(listener);/* w w w.j a v a 2s .c o m*/ }
From source file:com.redhat.lightblue.metadata.types.DateTypeTest.java
@Test public void testCompareV1Null() { assertEquals(dateType.compare(null, new Object()), -1); }