use of org.apache.bookkeeper.common.util.Revisioned in project bookkeeper by apache.
the class TestProtocolInternalUtils method testCreateGetStorageContainerEndpointRequest.
//
// Test Location Server Requests
//
@Test
public void testCreateGetStorageContainerEndpointRequest() {
List<Revisioned<Long>> scs = Lists.newArrayList(Revisioned.of(1000L, 1L), Revisioned.of(2000L, 2L), Revisioned.of(3000L, 3L));
GetStorageContainerEndpointRequest request = createGetStorageContainerEndpointRequest(scs);
assertEquals(3, request.getRequestsCount());
int i = 1;
for (OneStorageContainerEndpointRequest oneRequest : request.getRequestsList()) {
assertEquals(1000L * i, oneRequest.getStorageContainer());
assertEquals(1L * i, oneRequest.getRevision());
++i;
}
}
Aggregations