@Test
public void testThrowsWhileReadingInputStream() throws B2Exception {

    writer.setThrowWhileReadingInputStream();
    thrown.expect(B2Exception.class);
    thrown.expectMessage("failed to verify the sha1: test throwing in destination input stream read");
    writer.readContent(makeHeadersWithLenAndSha1(bytes.length, rightSha1), in);
}