List of usage examples for java.lang Object Object
@HotSpotIntrinsicCandidate
public Object()
From source file:org.jboss.arquillian.warp.extension.spring.container.provider.ProviderBaseTestCase.java
/** * <p>Initialize the provider instance used by this test.</p> * * @param provider the provider instance * * @throws Exception if any error occurs *//*from ww w . ja v a2s . co m*/ protected void initProvider(ResourceProvider provider) throws Exception { instance = provider; modelAndView = mock(ModelAndView.class); springMvcResult = new SpringMvcResultImpl(); springMvcResult.setModelAndView(modelAndView); springMvcResult.setException(new Exception()); springMvcResult.setInterceptors(new HandlerInterceptor[0]); springMvcResult.setHandler(new Object()); setSpringMvcResult(); }
From source file:com.github.pjungermann.config.specification.constraint.email.EmailConstraintTest.java
/** * @return expectation configs which are not valid for this {@link Constraint}. *//*w w w.j a v a 2s. c o m*/ @Override protected Object[] getInvalidExpectationConfigs() { return new Object[] { null, "invalid", 1234, new Object() }; }
From source file:org.wikidata.wdtk.datamodel.json.jackson.TestInnerValueObjects.java
@Test public void testEntityIdMethods() throws JsonMappingException { assertEquals("Q1", this.testEntityId.getStringId()); assertEquals(this.testEntityId.getNumericId(), 1); // test equals assertEquals(this.testEntityId, new JacksonInnerEntityId("item", 1)); assertEquals(this.testEntityId, this.testEntityId); assertFalse(this.testEntityId.equals(new Object())); assertFalse(this.testEntityId.equals(new JacksonInnerEntityId("item", 2))); }
From source file:org.jboss.arquillian.warp.extension.spring.interceptor.WarpInterceptorTestCase.java
/** * <p>Sets up the test environment.</p> */// www.ja v a 2 s . c o m @Before public void setUp() { // given instance = new WarpInterceptor(); handler = new Object(); modelAndView = new ModelAndView(); exception = new Exception(); springMvcResult = new SpringMvcResultImpl(); when(httpServletRequest.getAttribute(Commons.SPRING_MVC_RESULT_ATTRIBUTE_NAME)).thenReturn(springMvcResult); }
From source file:org.jasig.cas.client.util.CommonUtilsTests.java
public void testAssertNotEmpty() { final String CONST_MESSAGE = "test"; final Collection<Object> c = new ArrayList<Object>(); c.add(new Object()); CommonUtils.assertNotEmpty(c, CONST_MESSAGE); try {/*from w ww .j a v a 2 s. c om*/ CommonUtils.assertNotEmpty(new ArrayList<Object>(), CONST_MESSAGE); } catch (IllegalArgumentException e) { assertEquals(CONST_MESSAGE, e.getMessage()); } try { CommonUtils.assertNotEmpty(null, CONST_MESSAGE); } catch (IllegalArgumentException e) { assertEquals(CONST_MESSAGE, e.getMessage()); } }
From source file:ezbake.frack.eventbus.EventBus.java
/** * Add a event handler to the bus and have it listen for a given topic. * *@param topic the to listen on/*from w w w. j ava2 s .c o m*/ *@param handler the event handler that will handle the work coming in */ public void subscribe(String topic, String handler, Class<?> type) { Preconditions.checkArgument(!Strings.isNullOrEmpty(handler), "A non-null event handler must be passed in!"); Preconditions.checkArgument(!Strings.isNullOrEmpty(topic), "The topic can not be null or empty!"); topicToHandlers.put(topic, handler); if (!handlerToType.containsKey(handler)) { handlerToType.put(handler, type); handlerLocks.put(handler, new Object()); } }
From source file:com.sun.faces.lifecycle.LifecycleFactoryImpl.java
public LifecycleFactoryImpl() { super();/* w ww.j a v a2 s .c o m*/ lifecycleMap = new HashMap(); // We must have an implementation under this key. lifecycleMap.put(LifecycleFactory.DEFAULT_LIFECYCLE, new LifecycleWrapper(new LifecycleImpl(), false)); if (log.isDebugEnabled()) { log.debug("Created Default Lifecycle"); } lock = new Object(); }
From source file:com.github.aenygmatic.spring.osgi.registration.SpringBundleRegistryTest.java
private void givenExpectedSpringServiceRegisteredAs(ServiceRegistration registration, ArrayList<SpringOsgiComponent> components) { Object bean = new Object(); DummyDictionary beanParameters = new DummyDictionary(); components.add(new SpringOsgiComponent(Object.class, bean, beanParameters)); given(bundleContext.registerService("java.lang.Object", bean, beanParameters)).willReturn(registration); }
From source file:com.restfb.JsonMapperToJsonTest.java
/** * Can we handle the empty object?//www . ja v a2 s. c o m */ @Test public void emptyObject() { String json = createJsonMapper().toJson(new Object()); assertTrue("{}".equals(json)); }
From source file:com.job.portal.dao.JobApplicationsDAO.java
public JSONArray getJobApplicants(String jobId) { JSONArray arr = new JSONArray(); try {/*from w w w .j a va2s . co m*/ String query = "select ud.userId,ud.`name`,ud.dob,ud.phone,ud.email,ja.appliedOn " + "from user_details ud join job_applications ja " + "on ud.userId=ja.userId " + "where ja.jobId=? " + "order by ja.appliedOn desc; by ja.appliedOn desc;"; Object obj[] = new Object[1]; obj[0] = jobId; arr = fetchList(query, obj); } catch (Exception e) { LogOut.log.error("In " + new Object() { }.getClass().getEnclosingClass().getName() + "." + new Object() { }.getClass().getEnclosingMethod().getName() + " " + e); } finally { return arr; } }