@Test
public void testReadEmptyPager() throws
                                 Exception {

    // given a JSON string
    @SuppressWarnings("StringBufferReplaceableByString")
    final String jsonString = new StringBuilder().append('{')
                                                 .append("\"id\":")
                                                 .append(0)
                                                 .append(",\"size\":")
                                                 .append(0)
                                                 .append(",\"position\":")
                                                 .append(0)
                                                 .append(",\"history\":[]")
                                                 .append('}')
                                                 .toString();
    // when read this JSON string
    final StringReader reader = new StringReader(jsonString);
    final Pager pager = pagerJsonReader.read(reader);
    // then
    assertNotNull(pager);
    assertEquals(0,
                 pager.getId());
    assertEquals(0,
                 pager.getSize());
    assertEquals(0,
                 pager.getPosition());
    assertTrue(pager.getHistory()
                    .isEmpty());
}