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