S3MultipartUpload { void abort(String uploadId) { AbortMultipartUploadRequest request = new AbortMultipartUploadRequest(bucket, key, uploadId); s3.abortMultipartUpload(request); log.warn("Aborted upload to s3: }    }
@Test public void abort() { ArgumentCaptor<AbortMultipartUploadRequest> request = ArgumentCaptor.forClass(AbortMultipartUploadRequest.class); doNothing().when(s3).abortMultipartUpload(request.capture()); underTest.abort(UPLOAD_ID); assertThat(request.getValue().getBucketName(), is(BUCKET)); assertThat(request.getValue().getKey(), is(KEY)); assertThat(request.getValue().getUploadId(), is(UPLOAD_ID)); }