use of com.linkedin.restli.examples.greetings.client.GreetingsBuilders in project rest.li by linkedin.
the class TestGreetingClientContentTypes method testBatchGetKV.
@Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "clientDataBatchDataProvider")
public void testBatchGetKV(RestClient restClient, RestliRequestOptions requestOptions) throws RemoteInvocationException {
List<Long> ids = Arrays.asList(1L, 2L, 3L, 4L);
Request<BatchKVResponse<Long, Greeting>> request = new GreetingsBuilders(requestOptions).batchGet().ids(ids).buildKV();
Response<BatchKVResponse<Long, Greeting>> response = restClient.sendRequest(request).getResponse();
BatchKVResponse<Long, Greeting> batchResponse = response.getEntity();
Assert.assertEquals(batchResponse.getResults().size(), ids.size());
}
Aggregations