### Question:
BackupUploadService implements IBackupUploadService { @Override public void removeBackup(String fileName) { try { backupUploader.doRemoveBackup(fileName); log.debug("sopInstanceUID={}, removeBackup successful.", fileName); } catch (IOException ex) { MonitoringService.addEvent(Event.CSTORE_BACKUP_ERROR); log.error("sopInstanceUID={}, removeBackup failed.", fileName, ex); } } BackupUploadService(IBackupUploader backupUploader, BackupFlags backupFlags, DelayCalculator delayCalculator); @Override BackupState createBackup(InputStream inputStream, String uniqueFileName); @Override InputStream getBackupStream(String uniqueFileName); @Override void startUploading(IDicomWebClient webClient, BackupState backupState); @Override void removeBackup(String fileName); boolean filterHttpCode(Integer actualHttpStatus);  }### Answer:
@Test public void removeBackup_success() throws BackupException { backupUploadService.removeBackup(UNIQUE_FILE_NAME); verify(backupUploaderMock).doRemoveBackup(eq(UNIQUE_FILE_NAME)); }
@Test public void removeBackup_BackupException_notRethrowUpper() throws BackupException { doThrow(new BackupException("Err Message")).when(backupUploaderMock).doRemoveBackup(eq(UNIQUE_FILE_NAME)); backupUploadService.removeBackup(UNIQUE_FILE_NAME); verify(backupUploaderMock).doRemoveBackup(eq(UNIQUE_FILE_NAME)); }