public void testCheckpointAndChange_client() throws Exception {
DiffingConnectorCheckpoint fccp = DiffingConnectorCheckpoint.newFirst();
MockDocumentHandle mdh = new MockDocumentHandle("abc", "data");
Change c = new Change(Change.FactoryType.CLIENT, mdh, MCP);
CheckpointAndChange checkpointAndChange = new CheckpointAndChange(fccp, c);
String stringForm = checkpointAndChange.getJson().toString();
JSONObject json = new JSONObject(stringForm);
CheckpointAndChange copy = new CheckpointAndChange(json, internalFactory,
clientFactory);
assertEquals(fccp, copy.getCheckpoint());
assertEquals(c.getMonitorCheckpoint(),
copy.getChange().getMonitorCheckpoint());
MockDocumentHandle mdhCopy =
(MockDocumentHandle)copy.getChange().getDocumentHandle();
assertEquals(mdh.getDocumentId(), mdhCopy.getDocumentId());
assertEquals(mdh.getExtra(), mdhCopy.getExtra());
}