@Test
public void testThrowWhileWritingOutputStream() throws B2Exception {

    writer.setThrowWhileWritingOutputStream();
    thrown.expect(B2Exception.class);
    thrown.expectMessage("write failed: test throwing in output stream write");
    writer.readContent(makeHeadersWithLenAndSha1(bytes.length, rightSha1), in);
}