### Question:
Page implements Comparable<Page> { public int compareTo(@NotNull Page p) { if (p == null) { return 1; } else { return number - p.number; } } Page(@JsonProperty("size") int size,
				@JsonProperty("totalElements") int totalSize,
				@JsonProperty("totalPages") int totalPages,
				@JsonProperty("number") int number); int getSize(); int getTotalSize(); int getTotalPages(); int getNumber(); int compareTo(@NotNull Page p);  }### Answer:
@Test public void compareTo_nullComparison() { final int pageNum = 0; final Page page = new Page(10, 10, 10, pageNum); assertTrue(page.compareTo(null) > 0); }
@Test public void compareTo_lessThan() { final int pageNum = 0; final Page page = new Page(10, 10, 10, pageNum); final int cmpPageNum = 1; final Page cmpPage = new Page(10, 10, 10, cmpPageNum); assertTrue(page.compareTo(cmpPage) < 0); }
@Test public void compareTo_moreThan() { final int pageNum = 1; final Page page = new Page(10, 10, 10, pageNum); final int cmpPageNum = 0; final Page cmpPage = new Page(10, 10, 10, cmpPageNum); assertTrue(page.compareTo(cmpPage) > 0); }
@Test public void compareTo_equal() { final int pageNum = 1; final Page page = new Page(10, 10, 10, pageNum); final int cmpPageNum = 1; final Page cmpPage = new Page(10, 10, 10, cmpPageNum); assertTrue(page.compareTo(cmpPage) == 0); }