@Test
public void testGetContentLengthWithBogusValue() {

    final B2Headers withBogusContentLength = B2HeadersImpl
            .builder()
            .set(B2Headers.CONTENT_LENGTH, "non-numerical")
            .build();
    thrown.expect(IllegalStateException.class);
    thrown.expectMessage("can't parse Content-Length 'non-numerical' as a long: java.lang.NumberFormatException: For input string: \"non-numerical\"");
    withBogusContentLength.getContentLength();
}