### Question:
BackupConverter { public Backup convert(BackupFile backupFile) { Backup backup = new Backup(); backup.setFilename(backupFile.getFilename()); backup.setCreatedAt(backupFile.getCreatedAt()); return backup; }  Backup convert(BackupFile backupFile); List<Backup> convert(Iterable<BackupFile> files);  }### Answer:
@Test public void convertSingleBackup() { Backup backup = backupConverter.convert(new BackupFile(BACKUP_FILE_1)); assertEquals(BACKUP_FILE_1, backup.getFilename()); }
@Test public void convertMultipleBackups() { List<BackupFile> files = new ArrayList<>(Arrays.asList(new BackupFile(BACKUP_FILE_1), new BackupFile(BACKUP_FILE_2), new BackupFile(BACKUP_FILE_3))); List<Backup> backups = backupConverter.convert(files); assertEquals(3, backups.size()); }
@Test public void convertMEmptyList() { List<BackupFile> files = new ArrayList<>(); List<Backup> backups = backupConverter.convert(files); assertEquals(0, backups.size()); }