### Question:
OffsetBasedPagination implements Pagination { @Override public Optional<Pagination> last(long elements) { long maxOffset = calcMaxOffset(elements); return offset >= elements ? Optional.empty() : Optional.of(new OffsetBasedPagination(maxOffset / limit, limit)); } OffsetBasedPagination();  OffsetBasedPagination(long offset, long limit); @Override long getStart(); @Override long getEnd(); @Override long getOffset(); @Override long getLimit(); @Override Optional<Pagination> first(long elements); @Override Optional<Pagination> previous(long elements); @Override Optional<Pagination> next(long elements); @Override Optional<Pagination> last(long elements); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void startingWithOutOfBoundsOffsetThenLastPageEmpty() { OffsetBasedPagination pagination = new OffsetBasedPagination(201, 20); Optional<Pagination> last = pagination.last(200); assertFalse(last.isPresent()); }