Search in sources :

Example 1 with TyperefRecord

use of com.linkedin.restli.examples.typeref.api.TyperefRecord in project rest.li by linkedin.

the class TestComplexByteKeyResource method testGetMain.

private void testGetMain(RootBuilderWrapper.MethodBuilderWrapper<ComplexResourceKey<TyperefRecord, TwoPartKey>, TyperefRecord, TyperefRecord> requestBuilder) throws RemoteInvocationException {
    final ByteString byteData = ByteString.copy(new byte[] { 0, 32, -95 });
    Request<TyperefRecord> request = requestBuilder.id(getComplexKey(byteData)).build();
    ResponseFuture<TyperefRecord> future = getClient().sendRequest(request);
    Response<TyperefRecord> response = future.getResponse();
    Assert.assertEquals(response.getEntity().getBytes(), byteData);
}
Also used : ByteString(com.linkedin.data.ByteString) TyperefRecord(com.linkedin.restli.examples.typeref.api.TyperefRecord)

Aggregations

ByteString (com.linkedin.data.ByteString)1 TyperefRecord (com.linkedin.restli.examples.typeref.api.TyperefRecord)1