@Test
public void testDownloadByName() throws B2Exception {

    final B2ContentSink handler = (responseHeaders, in) -> {
    };
    B2DownloadByNameRequest request = B2DownloadByNameRequest
            .builder(bucketName(1), fileName(1))
            .setRange(B2ByteRange.startAt(17))
            .build();
    client.downloadByName(request, handler);
    verify(webifier, times(1)).downloadByName(anyObject(), eq(request), eq(handler));
    // check the "convenience" form that takes a bucketName & fileName instead of a request.
    client.downloadByName(bucketName(1), fileName(1), handler);
    B2DownloadByNameRequest request2 = B2DownloadByNameRequest
            .builder(bucketName(1), fileName(1))
            .build();
    verify(webifier, times(1)).downloadByName(anyObject(), eq(request2), eq(handler));
    // for coverage
    //noinspection ResultOfMethodCallIgnored
    request.hashCode();
    assertEquals(request,
            B2DownloadByNameRequest
                    .builder(bucketName(1), fileName(1))
                    .setRange(B2ByteRange.startAt(17))
                    .build());
}