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

  Checkpoint cp = null;
  // Happy path, Add V3 bootstrap parameters for bootstrap SNAPSHOT checkpoint
  cp = new Checkpoint("{\"consumption_mode\":\"BOOTSTRAP_SNAPSHOT\", \"bootstrap_since_scn\":0," +
      "\"bootstrap_start_scn\":1000,\"bootstrap_target_scn\":2000,\"bootstrap_catchup_source_index\":0," +
      "\"bootstrap_snapshot_source_index\":1,"+"\"storage_cluster_name\":\"testCluster\","+
      "\"bootstrap_snapshot_file_record_offset\":1000}");
  cp.assertCheckpoint();
  // Happy path, Add V3 bootstrap parameters for bootstrap CATCHUP checkpoint
  cp = new Checkpoint("{\"consumption_mode\":\"BOOTSTRAP_CATCHUP\", \"bootstrap_since_scn\":0," +
      "\"bootstrap_start_scn\":1000,\"bootstrap_target_scn\":2000,\"bootstrap_catchup_source_index\":1," +
      "\"bootstrap_snapshot_source_index\":1,"+"\"storage_cluster_name\":\"testCluster\","+
      "\"bootstrap_snapshot_file_record_offset\":1000}");
  cp.assertCheckpoint();
  // Unhappy path; V3 bootstrap parameter file_record_offset set, but not cluster name - SNAPSHOT
  try
  {
    cp = new Checkpoint("{\"consumption_mode\":\"BOOTSTRAP_SNAPSHOT\", \"bootstrap_since_scn\":0," +
        "\"bootstrap_start_scn\":1000,\"bootstrap_target_scn\":2000,\"bootstrap_catchup_source_index\":0," +
        "\"bootstrap_snapshot_source_index\":1,"+"\"storage_cluster_name\":\"\","+
        "\"bootstrap_snapshot_file_record_offset\":1000}");
    cp.assertCheckpoint();
    Assert.fail("The above checkpoint " + cp + " is invalid");
  } catch (InvalidCheckpointException e)
  {
  }
  // Unhappy path; V3 bootstrap parameter file_record_offset set, but not cluster name - CATCHUP
  try
  {
    cp = new Checkpoint("{\"consumption_mode\":\"BOOTSTRAP_CATCHUP\", \"bootstrap_since_scn\":0," +
        "\"bootstrap_start_scn\":1000,\"bootstrap_target_scn\":2000,\"bootstrap_catchup_source_index\":2," +
        "\"bootstrap_snapshot_source_index\":1,"+"\"storage_cluster_name\":\"\","+
        "\"bootstrap_snapshot_file_record_offset\":1000}");
    cp.assertCheckpoint();
    Assert.fail("The above checkpoint " + cp + " is invalid");
  } catch (InvalidCheckpointException e)
  {
  }
}