### Question:
ResultsPage { public int getPreviousPage() { return page > 0 ? page - 1 : -1; } 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 testGetPreviousPage() { log.info("testGetPreviousPage"); ResultsPage hasPrevious = new ResultsPage(RESULTS, 4, 1); assertEquals(0, hasPrevious.getPreviousPage()); ResultsPage noPrevious = new ResultsPage(RESULTS, 5, 0); assertEquals(-1, noPrevious.getPreviousPage()); ResultsPage all = new ResultsPage(RESULTS, 4, -1); assertEquals(-1, all.getPreviousPage()); log.info("Test successful!"); }