### Question:
PaginationOptions { public int getOffset() { if(pageNumber < 1) { return 0; } return pageNumber * pageSize; } PaginationOptions(int pageNumber, int pageSize, Comparator<T> sortComparator); int getPageNumber(); int getPageSize(); int getOffset();  }### Answer:
@Test public void createPaginationOptionsFirstPage() { PaginationOptions paginationOptions = new PaginationOptions(0, 10, null); assertEquals(paginationOptions.getOffset(), 0); }
@Test public void createPaginationOptionsSecondPage() { PaginationOptions paginationOptions = new PaginationOptions(1, 10, null); assertEquals(paginationOptions.getOffset(), 10); }