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:marytts.server.http.AudioStreamNHttpEntity.java

public AudioStreamNHttpEntity(Request maryRequest) {
    this.maryRequest = maryRequest;
    this.audio = maryRequest.getAudio();
    this.audioType = maryRequest.getAudioFileFormat().getType();
    setContentType(MaryHttpServerUtils.getMimeType(audioType));
    this.mutex = new Object();
}

From source file:com.github.drbookings.model.data.IDedTest.java

@Test
public void testIdentity03() {
    i = new IDed();
    final Object o = new Object();
    assertNotEquals(i.hashCode(), o.hashCode());
    assertNotEquals(i, o);/* ww w  .  ja va2s.c o  m*/
}

From source file:com.newlandframework.rpc.spring.NettyRpcService.java

public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
    this.applicationContext = applicationContext;
    applicationContext.publishEvent(new ServerStartEvent(new Object()));
}

From source file:edu.xjtu.qxcamerabridge.Qx10ServiceDelegatorImpl.java

/**
 * Test passed on Qx10/* www.j a v  a2s  . co  m*/
 *
 * @return
 */
@Override
public List<ShootMode> getSupportedShootMode() {
    String service = "camera";
    String serviceName = new Object() {
    }.getClass().getEnclosingMethod().getName();
    JSONObject replyJson = JSONActionWrapper.jsonrpc(service, serviceName, new ArrayList<>());
    JSONArray resultArray = replyJson.getJSONArray("result");
    JSONArray modeArray = resultArray.getJSONArray(0);
    List<ShootMode> modeList = new ArrayList<>();
    for (int i = 0; i < modeArray.length(); i++) {
        modeList.add(ShootMode.valueOf(modeArray.getString(i)));
    }
    return modeList;
}

From source file:com.basho.riak.client.query.SearchMapReduce.java

@Override
protected void writeInput(JsonGenerator jsonGenerator) throws IOException {
    jsonGenerator.writeObject(new Object() {
        @SuppressWarnings("unused")
        @JsonProperty/*  w  w  w .  ja v a2s  .  c o m*/
        String module = "riak_search";
        @SuppressWarnings("unused")
        @JsonProperty
        String function = "mapred_search";
        @SuppressWarnings("unused")
        @JsonProperty
        String[] arg = new String[] { bucket, query };
    });
}

From source file:com.lonepulse.robozombie.proxy.ProcessorInvocationTest.java

/**
 * <p>Tests {@link Processors#REQUEST} invocation with an illegal {@link InvocationContext} type.</p>
 *  //from w  w  w. j av  a  2  s .  c o m
 * @since 1.3.0
 */
@Test
public final void testRequestArgumentContextType() {

    expectedException.expect(Is.isA(RuntimeException.class));
    Processors.REQUEST.run(new Object());
}

From source file:org.apache.mina.springrpc.MinaServerHandlerTest.java

@Test
public final void messageReceivedCorrectly() throws Exception {
    ReturnAddressAwareRemoteInvocationHandler remoteInvocationInvoker = EasyMock
            .createMock(ReturnAddressAwareRemoteInvocationHandler.class);
    IoSession session = EasyMock.createMock(IoSession.class);
    RemoteInvocation decorated = RemoteInvocationFactory.createHashCodeRemoteInvocation();
    ReturnAddressAwareRemoteInvocation invocation = new ReturnAddressAwareRemoteInvocation(
            new UniqueStringReturnAddress(), decorated);

    ReturnAddressAwareRemoteInvocationResult result = new ReturnAddressAwareRemoteInvocationResult(
            invocation.getReturnAddress(), new Object());
    EasyMock.expect(remoteInvocationInvoker.invoke(invocation)).andReturn(result);
    WriteFuture writeFuture = null;/*from   w w w.  j  a v a2 s .  c om*/
    EasyMock.expect(session.write(result)).andReturn(writeFuture);

    Object[] mocks = new Object[] { remoteInvocationInvoker, session };
    EasyMock.replay(mocks);

    MinaServerHandler handler = new MinaServerHandler(remoteInvocationInvoker);
    handler.messageReceived(session, invocation);

    EasyMock.verify(mocks);
}

From source file:me.ferrybig.javacoding.webmapper.test.session.DefaultDataStorageTest.java

@Test
public void getDataReturnsBestType() {
    Object r = new Object();
    List<Object> list = new ArrayList<>();
    list.add(new JSONObject());
    list.add(r);/*  w  w w .j a v  a 2  s .  c om*/
    data.setData(list);
    assertEquals(r, extr(data.getDataAs(Object.class)));
}

From source file:org.iterx.miru.spring.beans.TestSpringBeanWrapper.java

public void testWrappedInstanceAccessors() {
    SpringBeanWrapper beanWrapper;/*w ww  .j  a va  2s  . c  o  m*/
    Object object;

    beanWrapper = new SpringBeanWrapper(beanFactory.assignBeanWrapper(object = new Object()));
    assertEquals(object, beanWrapper.getWrappedInstance());

    beanWrapper.setWrappedInstance(object = new Object());
    assertEquals(object, beanWrapper.getWrappedInstance());

    try {
        beanWrapper.setWrappedInstance(null);
        fail("Object is null");
    } catch (IllegalArgumentException e) {
    }
}

From source file:shiver.me.timbers.spring.security.jwt.AuthenticationRequestJwtTokenParserTest.java

@Test
public void Can_create_a_jwt_token_from_an_authentication() throws JwtInvalidTokenException {

    final Authentication authentication = mock(Authentication.class);

    final Object principal = new Object();

    final String expected = someString();

    // Given/*from  w w  w.  j  av  a2 s  . co m*/
    given(authenticationConverter.convert(authentication)).willReturn(principal);
    given(principleTokenParser.create(principal)).willReturn(expected);

    // When
    final String actual = tokenParser.create(authentication);

    // Then
    assertThat(actual, is(expected));
}