@Test
public void testExceptionFromGetSha1OrNull_inUpload() throws B2Exception, IOException {

    // arrange to throw when asked for the sha1.
    when(contentSource.getSha1OrNull()).thenThrow(new IOException("testing"));
    recordingListener.setExpected(); // no progress because threw before starting uploads.
    thrown.expect(B2LocalException.class);
    thrown.expectMessage("failed to get large file's sha1 from contentSource: testing");
    makeUploader(contentSource, recordingListener).uploadLargeFile();
}