### Question:
Filter { Filter setPage(Query query) { query.setFirstResult((getPageNo() - 1) * getPerPage()); query.setMaxResults(getPerPage()); return this; } Filter(Class<?> clazz);  Filter(int perPage, int pageNo, Condition... conditions);  Filter();  Filter(Condition... conditions); Filter condition(String name, Object value); Filter condition(String name, Operator operator, Object value); Filter page(int pageNo, int perPage); Filter sortBy(String name, boolean asc); Filter sortBy(SortField sortField); Filter cacheable(boolean cacheable); Filter clone(boolean paginate); List<T> list(); long count(); void delete();  }### Answer:
@Test public void shouldSetPageInQuery() { Filter filter = new Filter(6, 1); Query query = mock(Query.class); filter.setPage(query); verify(query).setFirstResult(0); verify(query).setMaxResults(6); }