### Question:
BackupServiceImpl implements BackupService { @Override public List<BackupInfoRecord> getBackups(String userName) { return backupDao.getBackups(userName); }  @Override String createBackup(EnvBackupDTO dto, UserInfo user); @Override void updateStatus(EnvBackupDTO dto, String user, EnvBackupStatus status); @Override List<BackupInfoRecord> getBackups(String userName); @Override BackupInfoRecord getBackup(String userName, String id);  }### Answer:
@Test public void getBackups() { BackupInfoRecord biRecord = mock(BackupInfoRecord.class); when(backupDao.getBackups(anyString())).thenReturn(Collections.singletonList(biRecord)); List<BackupInfoRecord> biRecords = backupService.getBackups(USER); assertNotNull(biRecords); assertEquals(1, biRecords.size()); assertEquals(Collections.singletonList(biRecord), biRecords); verify(backupDao).getBackups(USER); verifyNoMoreInteractions(backupDao); }