@Test
public void testSerialize() throws JsonParseException, JsonMappingException, IOException
{

  Checkpoint cp = Checkpoint.createOnlineConsumptionCheckpoint(1234L);
  cp.setWindowOffset(5677);
  cp.setPrevScn(1233L);
  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  cp.serialize(baos);
  //System.out.println("Serialized String="+ baos.toString());
  Checkpoint newCp = new Checkpoint(baos.toString());
  Assert.assertTrue(newCp.assertCheckpoint());
  assertEquals(cp, newCp);
  Assert.assertEquals(cp.hashCode(), newCp.hashCode());
}