### Question:
Paging implements java.io.Serializable { public Paging() { } Paging();  Paging(int page);  Paging(long sinceId);  Paging(int page, int count);  Paging(int page, long sinceId);  Paging(int page, int count, long sinceId);  Paging(int page, int count, long sinceId, long maxId); int getPage(); void setPage(int page); int getCount(); void setCount(int count); Paging count(int count); long getSinceId(); void setSinceId(long sinceId); Paging sinceId(long sinceId); long getMaxId(); void setMaxId(long maxId); Paging maxId(long maxId); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void testPaging() throws Exception { java.util.List<HttpParameter> params; Paging paging = new Paging(); params = paging.asPostParameterList(); assertEquals(0, params.size()); params = paging.asPostParameterList(Paging.S); assertEquals(0, params.size()); try { paging.setSinceId(-1l); fail("sinceId should not accept negative value"); } catch (IllegalArgumentException ignore) { } try { paging.asPostParameterList(Paging.S); } catch (IllegalStateException ise) { fail("IllegalStateException should not be thrown."); } params = paging.asPostParameterList(); assertEquals(0, params.size()); paging.setSinceId(2000l); params = paging.asPostParameterList(); assertEquals(1, params.size()); assertContains(params, "since_id", 2000l); try { paging.setPage(-1); fail("page should not accept negative value"); } catch (IllegalArgumentException ignore) { } paging.setPage(10); params = paging.asPostParameterList(); assertEquals(2, params.size()); assertContains(params, "page", 10); assertContains(params, "since_id", 2000l); try { paging.setMaxId(-1l); fail("maxId should not accept negative value"); } catch (IllegalArgumentException ignore) { } try { paging.asPostParameterList(Paging.S); fail("should accept only since_id parameter"); } catch (IllegalStateException ignore) { } params = paging.asPostParameterList(); assertEquals(2, params.size()); paging.setMaxId(1000l); params = paging.asPostParameterList(); assertEquals(3, params.size()); assertContains(params, "page", 10); assertContains(params, "max_id", 1000l); assertContains(params, "since_id", 2000l); try { paging.setCount(-1); fail("count should not accept negative value"); } catch (IllegalArgumentException ignore) { } try { paging.asPostParameterList(Paging.S); fail("should accept only since_id parameter"); } catch (IllegalStateException ignore) { } params = paging.asPostParameterList(); assertEquals(3, params.size()); paging.setCount(3000); params = paging.asPostParameterList(); assertEquals(4, params.size()); assertContains(params, "page", 10); assertContains(params, "max_id", 1000l); assertContains(params, "since_id", 2000l); assertContains(params, "count", 3000); }