### Question:
ResultsPage { public int getResultsEnd() { return page != -1 ? (pageSize * page) + results.size() : results.size(); } ResultsPage(List<Object> results, int pageSize, int page); List<Object> getResults(); int getResultsStart(); int getResultsEnd(); int getNextPage(); int getPreviousPage(); @Override boolean equals(final Object o); @Override int hashCode();  }### Answer:
@Test public void testGetResultsEnd(){ log.info("testGetResultsEnd"); ResultsPage hasMore = new ResultsPage(RESULTS, 4, 1); assertEquals(8, hasMore.getResultsEnd()); ResultsPage first = new ResultsPage(RESULTS, 5, 0); assertEquals(4, first.getResultsEnd()); ResultsPage all = new ResultsPage(RESULTS, 4, -1); assertEquals(4, all.getResultsEnd()); log.info("Test successful!"); }