Example usage for java.lang Object Object

List of usage examples for java.lang Object Object

Introduction

In this page you can find the example usage for java.lang Object Object.

Prototype

@HotSpotIntrinsicCandidate
public Object() 

Source Link

Document

Constructs a new object.

Usage

From source file:com.restfb.ParameterTest.java

@Test
public void equalsCheck_differentClass() {
    Parameter obj = Parameter.with("name", "value");
    assertFalse(obj.equals(new Object()));
}

From source file:jp.terasoluna.fw.beans.jxpath.BeanPointerExTest.java

/**
 * testBeanPointerExNodePointer01() <br>
 * <br>// ww  w  .j a va  2  s .c o  m
 * () <br>
 * A <br>
 * <br>
 * () parent:not null<br>
 * () name:not null<br>
 * () bean:new Object()<br>
 * () beanInfo:not null<br>
 * () this.beanInfo:null<br>
 * <br>
 * () this.beanInfo:???<br>
 * <br>
 * ?? <br>
 * @throws Exception ?????
 */
@Test
public void testBeanPointerExNodePointer01() throws Exception {
    // ??
    QName qName = new QName("name");
    Object bean = new Object();
    JXPathBeanInfo beanInfo = new JXPathBasicBeanInfo(bean.getClass());
    Locale locale = new Locale("ja");
    NodePointer nodePointer = NodePointer.newNodePointer(qName, bean, locale);

    // 
    BeanPointerEx result = new BeanPointerEx(nodePointer, qName, bean, beanInfo);

    // 
    assertEquals(beanInfo, ReflectionTestUtils.getField(result, "beanInfo"));
}

From source file:com.uimirror.auth.otp.OTPStepDef.java

@Then("^I call the otp validation service$")
public void i_call_the_otp_validation_service() throws Throwable {
    // Write code here that turns the phrase above into concrete actions
    when(someBean.test()).thenReturn("Helooooooooo done");
    String res = new RestTemplate().postForObject("http://localhost:8080/uim/auth/api/auth/login", new Object(),
            String.class);
    System.out.println(res);//from   ww  w.j  av  a 2 s . co  m
    throw new PendingException();
}

From source file:org.wikidata.wdtk.datamodel.json.jackson.TestInnerValueObjects.java

@Test
public void testMonolingualTextMethods() {
    assertEquals(this.testMonolingualText.getLanguage(), "en");
    assertEquals(this.testMonolingualText.getText(), "foobar");

    // test equals
    assertEquals(this.testMonolingualText, new JacksonInnerMonolingualText("en", "foobar"));
    assertEquals(this.testMonolingualText, this.testMonolingualText);
    assertFalse(this.testMonolingualText.equals(new Object()));
    assertFalse(this.testMonolingualText.equals(new JacksonInnerMonolingualText("en", "barfoo")));
    assertFalse(this.testMonolingualText.equals(new JacksonInnerMonolingualText("de", "foobar")));

}

From source file:com.github.shredder121.gh_event_api.handler.HmacBehaviorTest.java

private static Map<String, Object> getBody() {
    return ImmutableMap.<String, Object>builder().put("ref_type", "tag").put("ref", "0.1")
            .put("master_branch", "master").put("description", "").put("pusher_type", "user")
            .put("repository", new Object()).put("sender", new Object()).build();
}

From source file:com.job.portal.dao.UserDetailsDAO.java

public boolean checkEmailExists(String email) {
    boolean flag = false;
    try {/*from w  ww  .j a  va 2  s  .  co  m*/
        String query = "select email from user_details where email=?";
        Object arr[] = { email };
        JSONObject obj = fetchOne(query, arr);
        flag = obj == null ? false : true;
    } catch (Exception e) {
        LogOut.log.error("In " + new Object() {
        }.getClass().getEnclosingClass().getName() + "." + new Object() {
        }.getClass().getEnclosingMethod().getName() + " " + e);
    } finally {
        return flag;
    }

}

From source file:code.google.restclient.core.Hitter.java

public Hitter() {
    configureSysProxy();
    headers = new LinkedHashMap<String, String>();
    lock = new Object();
}

From source file:com.redhat.lightblue.metadata.types.StringTypeTest.java

@Test
public void testCompareV1Null() {
    assertEquals(stringType.compare(null, new Object()), -1);
}

From source file:org.apache.gobblin.writer.AsyncHttpWriterTest.java

/**
 * Test successful writes of 4 records//from ww  w  . j a v  a  2  s. com
 */
@Test
public void testSuccessfulWrites() {
    MockHttpClient client = new MockHttpClient();
    MockRequestBuilder requestBuilder = new MockRequestBuilder();
    MockResponseHandler responseHandler = new MockResponseHandler();
    MockAsyncHttpWriterBuilder builder = new MockAsyncHttpWriterBuilder(client, requestBuilder,
            responseHandler);
    TestAsyncHttpWriter asyncHttpWriter = new TestAsyncHttpWriter(builder);

    List<MockWriteCallback> callbacks = new ArrayList<>();
    for (int i = 0; i < 4; i++) {
        callbacks.add(new MockWriteCallback());
    }
    asyncHttpWriter.write(new Object(), callbacks.get(0));
    asyncHttpWriter.write(new Object(), callbacks.get(1));
    asyncHttpWriter.write(new Object(), callbacks.get(2));

    try {
        asyncHttpWriter.flush();
    } catch (IOException e) {
        Assert.fail("Flush failed");
    }

    asyncHttpWriter.write(new Object(), callbacks.get(3));
    try {
        asyncHttpWriter.close();
    } catch (IOException e) {
        Assert.fail("Close failed");
    }

    // Assert all successful callbacks are invoked
    for (MockWriteCallback callback : callbacks) {
        Assert.assertTrue(callback.isSuccess);
    }

    Assert.assertTrue(client.isCloseCalled);
}

From source file:com.comcast.cats.service.ir.redrat.RedRatManagerImpl.java

@Override
@AccessTimeout(value = TelnetConnection.DEFAULT_READ_TIMEOUT, unit = TimeUnit.MILLISECONDS)
public RedRatDevice getIrDevice(String ip) {
    synchronized (new Object()) {
        RedRatDevice retVal = null;/*from w w w . j  a v  a2 s. c  o m*/
        logger.info("RedRatManager getIrDevice irDevices " + irDevices);
        if (ip != null && irDevices != null) {
            for (RedRatDevice irDevice : irDevices) {
                if (irDevice instanceof IrNetBoxPro) {
                    if (((IrNetBoxPro) irDevice).getIpAddress().equals(ip)) {
                        retVal = irDevice;
                    }
                }
            }
        }
        return retVal;
    }
}