for (int i = 0; i < numOfMos; i++) {
inventory.create(aSampleMo().withName("MO" + i).with(new Coordinate()).build());
}
// When
ManagedObjectCollectionRepresentation mos = inventory.getManagedObjects().get();
// Then
assertThat(mos.getPageStatistics().getTotalPages(), is(4));
// When
ManagedObjectCollectionRepresentation secondPage = inventory.getManagedObjects().getPage(mos, 2);
// Then
assertThat(secondPage.getPageStatistics().getCurrentPage(), is(2));
// When
ManagedObjectCollectionRepresentation thirdPage = inventory.getManagedObjects().getNextPage(secondPage);
// Then
assertThat(thirdPage.getPageStatistics().getCurrentPage(), is(3));
// When
ManagedObjectCollectionRepresentation firstPage = inventory.getManagedObjects().getPreviousPage(secondPage);
assertThat(firstPage.getPageStatistics().getCurrentPage(), is(1));
}