@Test
public void testBackupMetaData() throws Exception {

    BackupMetadata metadata =
            new BackupMetadata(
                    BackupVersion.SNAPSHOT_BACKUP, "123", Calendar.getInstance().getTime());
    String json = metadata.toString();
    LOG.info(json);
    // Deserialize it.
    BackupMetadata metadata1 =
            GsonJsonSerializer.getGson().fromJson(json, BackupMetadata.class);
    LOG.info(metadata1.toString());
    Assert.assertEquals(metadata.getSnapshotDate(), metadata1.getSnapshotDate());
    Assert.assertEquals(metadata.getToken(), metadata1.getToken());
}