### Question:
B2LargeFileUploader { B2FileVersion finishUploadingLargeFile(B2FileVersion largeFileVersion, List<B2Part> alreadyUploadedParts) throws B2Exception { throwIfLargeFileVersionDoesntSeemToMatchRequest(largeFileVersion, contentLength, request); alreadyUploadedParts.sort(Comparator.comparingInt(B2Part::getPartNumber)); final List<B2PartSpec> allPartSpecs = partSizes.pickParts(contentLength); final Map<B2PartSpec, B2Part> alreadyUploadedSpecs = new TreeMap<>(); { int iPartSpec = 0; int iUploadedPart = 0; while (iPartSpec < allPartSpecs.size() && iUploadedPart < alreadyUploadedParts.size()) { final B2PartSpec partSpec = allPartSpecs.get(iPartSpec); final B2Part alreadyUploadedPart = alreadyUploadedParts.get(iUploadedPart); if (similarEnough(partSpec, alreadyUploadedPart)) { alreadyUploadedSpecs.put(partSpec, alreadyUploadedPart); iUploadedPart++; } iPartSpec++; } } return uploadPartsAndFinish(largeFileVersion, allPartSpecs, alreadyUploadedSpecs); } B2LargeFileUploader(B2Retryer retryer,
                        B2StorageClientWebifier webifier,
                        B2AccountAuthorizationCache accountAuthCache,
                        Supplier<B2RetryPolicy> retryPolicySupplier,
                        ExecutorService executor,
                        B2PartSizes partSizes,
                        B2UploadFileRequest request,
                        long contentLength);   }### Answer:
@Test public void testExceptionFromGetSha1OrNull_inResume() throws B2Exception, IOException { when(contentSource.getSha1OrNull()).thenThrow(new IOException("testing")); final B2FileVersion version = new B2FileVersion(fileId(1), fileName(1), contentSource.getContentLength(), B2ContentTypes.B2_AUTO, null, null, B2Collections.mapOf(), "upload", 123L); recordingListener.setExpected(); thrown.expect(B2LocalException.class); thrown.expectMessage("failed to get large file's sha1: java.io.IOException: testing"); makeUploader(contentSource, recordingListener).finishUploadingLargeFile(version, B2Collections.listOf()); }