use of org.glassfish.jersey.client.ChunkedInput in project Gaffer by gchq.
the class OperationServiceIT method shouldReturnChunkedGroupCounts.
@Test
public void shouldReturnChunkedGroupCounts() throws IOException {
// Given
RestApiTestUtil.addElements(DEFAULT_ELEMENTS);
// When
final Response response = RestApiTestUtil.executeOperationChainChunked(new OperationChain.Builder().first(new GetAllElements<>()).then(new CountGroups()).build());
// Then
final List<GroupCounts> results = readChunkedResults(response, new GenericType<ChunkedInput<GroupCounts>>() {
});
assertEquals(1, results.size());
final GroupCounts groupCounts = results.get(0);
verifyGroupCounts(groupCounts);
}
Aggregations