BackupFilesManager { public File getCurrentBackupFile() { return backupFile; } BackupFilesManager(String baseDir, Clock clock); File getCurrentBackupFile(); Optional<File> rolloverBackupFileIfExists(); List<File> getTemporaryBackupV2Files(String temporaryDir); void delete(File file); List<File> getRolledBackupFiles();  }
@Test public void shouldUseNewNamingSchemeWhenNoFilesAvailable() { BackupFilesManager backupFilesManager = new BackupFilesManager(tempDir.getAbsolutePath(), clock); File file = backupFilesManager.getCurrentBackupFile(); assertThat(file.getName()).isEqualTo("hermes-buffer-v3.dat"); }