@Test
public void testTTLNext() throws Exception {

    int daysForSnapshot = configuration.getBackupRetentionDays() + 1;
    prepTest(daysForSnapshot);
    // Run ttl till 3rd meta file.
    backupTTLService.execute();
    List<String> remoteFiles = getAllFiles();
    // Confirm the files.
    Assert.assertEquals(6, remoteFiles.size());
    Assert.assertTrue(remoteFiles.contains(allFilesMap.get("mc-4-Data.db")));
    Assert.assertTrue(remoteFiles.contains(allFilesMap.get("mc-6-Data.db")));
    Assert.assertTrue(remoteFiles.contains(allFilesMap.get("mc-7-Data.db")));
    Assert.assertTrue(remoteFiles.contains(allFilesMap.get("META2")));
    // GRACE PERIOD files.
    Assert.assertTrue(remoteFiles.contains(allFilesMap.get("mc-3-Data.db")));
    Assert.assertTrue(remoteFiles.contains(allFilesMap.get("mc-5-Data.db")));
    Assert.assertFalse(remoteFiles.contains(allFilesMap.get("mc-1-Data.db")));
    Assert.assertFalse(remoteFiles.contains(allFilesMap.get("mc-2-Data.db")));
    Assert.assertFalse(remoteFiles.contains(allFilesMap.get("META0")));
    Assert.assertFalse(remoteFiles.contains(allFilesMap.get("META1")));
}