@Test
public void abortAll() throws Exception {

    UploadPartRequest request1 = UploadPartRequest.builder().uploadPartNum(1).build();
    final UploadPartResponse response1 = UploadPartResponse.builder().build();
    when(service.uploadPart(request1))
            .thenAnswer(
                    new Answer<UploadPartResponse>() {
                        @Override
                        public UploadPartResponse answer(InvocationOnMock arg0)
                                throws Throwable {
                            // long enough to abort without starting the task
                            Thread.sleep(10000L);
                            return response1;
                        }
                    });
    manager.startTransfer(request1);
    manager.abortAll();
    // aborted before it started, should surface as an in-progress part
    List<Integer> inProgressParts = manifest.listInProgressParts();
    assertEquals(1, inProgressParts.size());
    assertEquals(1, inProgressParts.get(0).intValue());
}