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:cherry.foundation.async.PropertyMessagePostProcessorTest.java

@Test
public void testObjectProperty() throws JMSException {
    Object object = new Object();
    MessagePostProcessor processor = createProcessor("key", object);
    Message message = mock(Message.class);
    processor.postProcessMessage(message);
    verify(message).setObjectProperty("key", object);
}

From source file:com.thoughtworks.go.server.cache.GoCacheTest.java

@Test
public void shouldBeAbleToGetAnObjectThatIsPutIntoIt() {
    Object o = new Object();
    goCache.put("someKey", o);
    assertSame(o, goCache.get("someKey"));
}

From source file:com.tacitknowledge.util.migration.PatchRollbackPredicateTest.java

public void testPatchRollbackPredicateWrongClass() {

    //create a new predicate
    Predicate patchRollbackPredicate = new PatchRollbackPredicate(10, 2);

    boolean result = patchRollbackPredicate.evaluate(new Object());
    assertFalse("testPatchRollbackPredicateWrongClass returned true unexpectedly", result);
}

From source file:com.xtructure.xutil.valid.strategy.UTestTestValidationStrategy.java

public void processSuccessBehavesAsExpected() {
    Condition predicate = isNotNull();
    Object object = new Object();
    String msg = String.format("%s %s", object, predicate);
    TestValidationStrategy<Object> vs = new TestValidationStrategy<Object>(predicate);
    vs.validate(object);//  w  w w  . j a va2s .c om
    vs.validate(object, msg);
}

From source file:com.microsoft.live.unittest.GetTest.java

@Override
public void testAsyncResponseBodyValidWithUserState() throws Throwable {
    this.loadValidResponseBody();

    Object userState = new Object();
    String requestPath = Paths.ME;
    this.runTestOnUiThread(createAsyncRunnable(requestPath, userState));

    LiveOperation fromMethod = this.responseQueue.take();
    LiveOperation fromCallback = this.pollResponseQueue();

    this.checkReturnedOperations(fromMethod, fromCallback);
    this.checkOperationMembers(fromMethod, METHOD, requestPath, userState);
    this.checkValidResponseBody(fromMethod);
}

From source file:net.cpollet.jixture.fixtures.TestMappingFixture.java

@Test
public void entityPassesFilterReturnsFalseWhenEntityDoesNotPassFilter() {
    // GIVEN/*from  ww  w. jav a  2 s.  com*/
    MappingFixture mappingFixture = new MappingFixture();
    mappingFixture.setFilter(new Filter() {
        @Override
        public boolean filter(Object entity) {
            return false;
        }
    });

    // WHEN
    boolean actualValue = mappingFixture.filter(new Object());

    // THEN
    assertThat(actualValue).isFalse();
}

From source file:minium.script.rhinojs.RhinoConfiguration.java

@Bean
@JsVariable(value = "__console", expression = "console = require('console');", deleteAfterExpression = true)
public Object console() {
    return new Object();
}

From source file:com.xtructure.xutil.valid.strategy.UTestStateValidationStrategy.java

public void processSuccessBehavesAsExpected() {
    Condition predicate = isNotNull();
    Object object = new Object();
    String msg = String.format("%s %s", object, predicate);
    StateValidationStrategy<Object> vs = new StateValidationStrategy<Object>(predicate);
    vs.validate(object);// w ww. j  a  v a2  s  .  com
    vs.validate(object, msg);
}

From source file:hk.hku.cecid.corvus.http.HttpSenderUnitTest.java

/** Test {@link HttpSender#getUserObject()} **/
public void testUserObjectProperty() {
    Object usrObj = new Object();
    this.target.setUserObject(usrObj);
    assertEquals(usrObj, this.target.getUserObject());
}

From source file:com.visionspace.jenkins.vstart.plugin.VSPluginPerformer.java

public Long runVstart(Long id, BuildListener listener, int timeInterval) {
    try {/*from w w  w.j  a  v a2s  .  c o  m*/
        //Run VSTART
        org.json.JSONObject runObject = vstObject.run(id);
        listener.getLogger().println("\nVSTART is now running!");
        Long reportId = runObject.getLong("reportId");

        //Inform which test case is running
        //listener.getLogger().println("The test case " + vstObject.getTestCase(testCaseId) + "has started.");

        //For concurrency issues
        Object obj = new Object();

        synchronized (obj) {
            long timeStamp = 0;
            org.json.JSONObject logger = null;

            do {
                logger = vstObject.getLog(reportId, timeStamp);
                JSONArray jArray = logger.getJSONArray("log");
                for (int i = 0; i < jArray.length(); i++) {
                    org.json.JSONObject json = jArray.getJSONObject(i);
                    Long eventTimeStamp = json.getLong("timestamp");
                    Date date = new Date(eventTimeStamp);
                    listener.getLogger().println(json.getString("level") + " " + /*eventTimeStamp*/date + " ["
                            + json.getString("resource") + "]" + " - " + json.getString("message") + "\n");

                    //Stores the latest timestamp
                    if (eventTimeStamp > timeStamp) {
                        timeStamp = eventTimeStamp;
                    }
                }
                if (!logger.getBoolean("finished")) {
                    obj.wait(timeInterval);
                }
            } while (!logger.getBoolean("finished"));
        }

        //inform the finishing of the test case execution
        //listener.getLogger().println("The test case " + vstObject.getTestCase(testCaseId) + "has finished its execution.");

        //Finished run
        listener.getLogger().println("VSTART run has now ended!");

        return reportId;
    } catch (URISyntaxException ex) {
        Logger.getLogger(VSPluginPerformer.class.getName()).log(Level.SEVERE, null, ex);
        listener.getLogger().println("Exception during the VSTART run! -> " + ex.getReason());
        return 0l;
    } catch (IOException ex) {
        Logger.getLogger(VSPluginPerformer.class.getName()).log(Level.SEVERE, null, ex);
        listener.getLogger().println("Exception during the VSTART run! -> " + ex.getMessage());
        return 0l;
    } catch (InterruptedException ex) {
        Logger.getLogger(VSPluginPerformer.class.getName()).log(Level.SEVERE, null, ex);
        listener.getLogger().println("Exception during the VSTART run! -> " + ex.getMessage());
        return 0l;
    }
}