List of usage examples for java.lang Object Object
@HotSpotIntrinsicCandidate
public Object()
From source file:gaderian.test.utilities.TestSpringLookupFactory.java
public void testDefaultFactory() { SpringLookupFactory lf = new SpringLookupFactory(); BeanFactory beanFactory = createMock(BeanFactory.class); ServiceImplementationFactoryParameters fp = createMock(ServiceImplementationFactoryParameters.class); lf.setDefaultBeanFactory(beanFactory); SpringBeanParameter param = buildParameter("fred", null); Object fred = new Object(); expect(beanFactory.getBean("fred", List.class)).andReturn(fred); expect(fp.getFirstParameter()).andReturn(param); expect(fp.getServiceInterface()).andReturn(List.class); replayAllRegisteredMocks();//from ww w. j a v a 2s . c o m Object actual = lf.createCoreServiceImplementation(fp); assertSame(fred, actual); verifyAllRegisteredMocks(); }
From source file:com.adaptris.core.fs.enhanced.FileSorterCase.java
protected static String safeName() { return new SafeGuidGenerator().create(new Object()); }
From source file:com.intuit.tank.api.model.v1.automation.adapter.MapEntryTypeTest.java
/** * Run the boolean equals(Object) method test. * * @throws Exception/*from www . ja va2 s . c om*/ * * @generatedBy CodePro at 12/15/14 2:50 PM */ @Test public void testEquals_1() throws Exception { MapEntryType fixture = new MapEntryType(); fixture.setKey(""); fixture.setValue(""); Object obj = new Object(); boolean result = fixture.equals(obj); assertEquals(false, result); }
From source file:marytts.tools.perceptiontest.AudioStreamNHttpEntity.java
public AudioStreamNHttpEntity(UtteranceRequest maryRequest) { this.maryRequest = maryRequest; this.audio = maryRequest.getAudio(); this.audioType = maryRequest.getAudioFileFormat().getType(); setContentType(MaryHttpServerUtils.getMimeType(audioType)); this.mutex = new Object(); }
From source file:ProdCons1.java
protected void produce() { int len = 0;// w w w .j a va 2s .co m synchronized (list) { Object justProduced = new Object(); list.addFirst(justProduced); len = list.size(); list.notifyAll(); } System.out.println("List size now " + len); }
From source file:jp.terasoluna.fw.beans.jxpath.DynamicPointerExTest.java
/** * testDynamicPointerExQname01() <br> * <br>/*from ww w . j a v a 2s .co m*/ * () <br> * A <br> * <br> * () name:not null<br> * () bean:new Object()<br> * () handler:not null<br> * () locale:Locale("ja")<br> * () this.handler:null<br> * <br> * () this.handler:???<br> * <br> * ?? <br> * @throws Exception ????? */ @Test public void testDynamicPointerExQname01() throws Exception { // ?? QName qName = new QName("name"); Object bean = new Object(); DynamicPropertyHandler handler = new MapDynamicPropertyHandler(); Locale locale = new Locale("ja"); // DynamicPointerEx result = new DynamicPointerEx(qName, bean, handler, locale); // Field field = DynamicPointerEx.class.getDeclaredField("handler"); field.setAccessible(true); Object resultHandler = field.get(result); assertSame(handler, resultHandler); }
From source file:jp.terasoluna.fw.beans.jxpath.BeanPointerExTest.java
/** * testBeanPointerExQname01() <br> * <br>//w w w . ja va 2s . com * () <br> * A <br> * <br> * () name:not null<br> * () bean:new Object()<br> * () beanInfo:not null<br> * () locale:Locale("ja")<br> * () this.beanInfo:null<br> * <br> * () this.beanInfo:???<br> * <br> * ?? <br> * @throws Exception ????? */ @Test public void testBeanPointerExQname01() throws Exception { // ?? QName qName = new QName("name"); Object bean = new Object(); JXPathBeanInfo beanInfo = new JXPathBasicBeanInfo(bean.getClass()); Locale locale = new Locale("ja"); // BeanPointerEx result = new BeanPointerEx(qName, bean, beanInfo, locale); // assertEquals(beanInfo, ReflectionTestUtils.getField(result, "beanInfo")); }
From source file:com.notonthehighstreet.ratel.internal.utility.HttpRequestTest.java
@Test public void callShouldMakeHTTPRequest() throws Exception { final String method = "GET"; final String parameterName = "name"; final String parameterValue = "value"; final Object body = new Object(); final int expected = 123123; final HttpURLConnection connection = mock(HttpURLConnection.class); final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); when(connection.getOutputStream()).thenReturn(outputStream); when(connection.getResponseCode()).thenReturn(expected); final int actual = subject.call(connection, method, Collections.singletonMap(parameterName, parameterValue), body);/*from ww w. j a v a 2 s . c o m*/ assertEquals(expected, actual); verify(mapper).writeValue(same(outputStream), same(body)); verify(connection).setRequestMethod(eq(method)); verify(connection).setReadTimeout(anyInt()); verify(connection).setConnectTimeout(anyInt()); verify(connection).setDoOutput(eq(true)); verify(connection).setRequestProperty(eq(parameterName), eq(parameterValue)); }
From source file:com.gemstone.gemfire.security.GemFireSecurityExceptionTest.java
@Before public void setUp() throws Exception { this.message = testName.getMethodName() + " message"; this.causeMessage = testName.getMethodName() + " cause message"; this.nonSerializableResolvedObj = new Object(); this.nonSerializableNamingException = new NamingException(this.causeMessage); this.nonSerializableNamingException.setResolvedObj(this.nonSerializableResolvedObj); this.serializableResolvedObj = new SerializableObject(this.testName.getMethodName()); this.serializableNamingException = new NamingException(this.causeMessage); this.serializableNamingException.setResolvedObj(this.serializableResolvedObj); assertPreConditions();//from w w w.ja va 2 s .co m }
From source file:com.google.code.ssm.json.ClassAliasIdResolverTest.java
@Test public void addClassToId() { resolver.addClassToId(ClassAliasIdResolverTest.class, "cairt"); String id = resolver.idFromValue(new ClassAliasIdResolverTest()); assertNotNull(id);/*ww w . ja va2 s .c o m*/ assertEquals("cairt", id); id = resolver.idFromValue(new Object()); assertEquals(Object.class.getName(), id); }