@Test
public void testIsMetaFileValid() throws Exception {

    Instant snapshotInstant = DateUtil.getInstant();
    Path metaPath = backupUtils.createMeta(getRemoteFakeFiles(), snapshotInstant);
    AbstractBackupPath abstractBackupPath = abstractBackupPathProvider.get();
    abstractBackupPath.parseLocal(metaPath.toFile(), AbstractBackupPath.BackupFileType.META_V2);
    Assert.assertTrue(metaProxy.isMetaFileValid(abstractBackupPath).valid);
    FileUtils.deleteQuietly(metaPath.toFile());
    List<String> fileToAdd = getRemoteFakeFiles();
    fileToAdd.add(
            Paths.get(
                            getPrefix(),
                            AbstractBackupPath.BackupFileType.SST_V2.toString(),
                            "1859817645000",
                            "keyspace1",
                            "columnfamily1",
                            "SNAPPY",
                            "PLAINTEXT",
                            "file9.Data.db")
                    .toString());
    metaPath = backupUtils.createMeta(fileToAdd, snapshotInstant);
    Assert.assertFalse(metaProxy.isMetaFileValid(abstractBackupPath).valid);
    FileUtils.deleteQuietly(metaPath.toFile());
    metaPath = Paths.get(configuration.getDataFileLocation(), "meta_v2_201801010000.json");
    Assert.assertFalse(metaProxy.isMetaFileValid(abstractBackupPath).valid);
}