### Question:
PageRequestAdapter implements PageRequest { public int getOffset() { return getPageNumber() * getPageSize(); } PageRequestAdapter(PagedDataModelState state); int getPageNumber(); int getPageSize(); int getOffset(); String getSortColumn(); boolean isSortAscending(); Map<String, String> getFilters();  }### Answer:
@Test public void shouldCalculateOffset() throws Exception { this.state.setRowIndex(0); assertThat(this.adapter.getOffset(), is(0)); this.state.setRowIndex(1); assertThat(this.adapter.getOffset(), is(0)); this.state.setRowIndex(2); assertThat(this.adapter.getOffset(), is(0)); this.state.setRowIndex(3); assertThat(this.adapter.getOffset(), is(3)); this.state.setRowIndex(4); assertThat(this.adapter.getOffset(), is(3)); this.state.setRowIndex(5); assertThat(this.adapter.getOffset(), is(3)); }