@Test public void startUploading_BackupExceptionOnDoReadBackup_failed() throws BackupException { String exMsg = "reason"; when(backupUploaderMock.doReadBackup(eq(UNIQUE_FILE_NAME))).thenThrow(new BackupException(exMsg)); exceptionRule.expect(BackupException.class); exceptionRule.expectMessage(exMsg); backupUploadService.startUploading(webClientMock, spyBackupState); }
@Override public void startUploading(IDicomWebClient webClient, BackupState backupState) throws IBackupUploader.BackupException { scheduleUploadWithDelay(webClient, backupState); }
BackupUploadService implements IBackupUploadService { @Override public void startUploading(IDicomWebClient webClient, BackupState backupState) throws IBackupUploader.BackupException { scheduleUploadWithDelay(webClient, backupState); } }
BackupUploadService implements IBackupUploadService { @Override public void startUploading(IDicomWebClient webClient, BackupState backupState) throws IBackupUploader.BackupException { scheduleUploadWithDelay(webClient, backupState); } BackupUploadService(IBackupUploader backupUploader, BackupFlags backupFlags, DelayCalculator delayCalculator); }
BackupUploadService implements IBackupUploadService { @Override public void startUploading(IDicomWebClient webClient, BackupState backupState) throws IBackupUploader.BackupException { scheduleUploadWithDelay(webClient, backupState); } 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); }
BackupUploadService implements IBackupUploadService { @Override public void startUploading(IDicomWebClient webClient, BackupState backupState) throws IBackupUploader.BackupException { scheduleUploadWithDelay(webClient, backupState); } 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);  }