@Test
public void testDownloadById() throws B2Exception {

    final B2ContentSink handler = (responseHeaders, in) -> {
    };
    B2DownloadByIdRequest request = B2DownloadByIdRequest
            .builder(LARGE_FILE_ID)
            .setRange(B2ByteRange.between(10, 12))
            .build();
    assertEquals(B2ByteRange.between(10, 12), request.getRange());
    client.downloadById(request, handler);
    verify(webifier, times(1)).downloadById(anyObject(), eq(request), eq(handler));
    // check the "convenience" form that takes a fileId instead of a request.
    client.downloadById(fileId(2), handler);
    B2DownloadByIdRequest request2 = B2DownloadByIdRequest
            .builder(fileId(2))
            .build();
    assertNull(request2.getRange());
    verify(webifier, times(1)).downloadById(anyObject(), eq(request2), eq(handler));
    // for coverage
    //noinspection ResultOfMethodCallIgnored
    request.hashCode();
}