### Question:
BackupServiceImpl implements BackupService { @Override public String createBackup(EnvBackupDTO dto, UserInfo user) { updateStatus(dto, user.getName(), EnvBackupStatus.CREATING); return provisioningService.post(BackupAPI.BACKUP, user.getAccessToken(), dto, String.class); }  @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 createBackup() { doNothing().when(backupDao).createOrUpdate(any(EnvBackupDTO.class), anyString(), any(EnvBackupStatus.class)); String expectedUuid = "1234-56789765-4321"; String token = "token"; when(provisioningService.post(refEq(BackupAPI.BACKUP), eq(token), any(EnvBackupDTO.class), any())) .thenReturn(expectedUuid); EnvBackupDTO ebDto = EnvBackupDTO.builder().build(); UserInfo userInfo = new UserInfo(USER, token); String uuid = backupService.createBackup(ebDto, userInfo); assertNotNull(uuid); assertEquals(expectedUuid, uuid); verify(backupDao).createOrUpdate(ebDto, USER, EnvBackupStatus.CREATING); verify(provisioningService).post(BackupAPI.BACKUP, token, ebDto, String.class); verifyNoMoreInteractions(backupDao, provisioningService); }