@Test
public void testGetBucketByName() throws B2Exception {

    final B2ListBucketsRequest expectedRequest = B2ListBucketsRequest
            .builder(ACCOUNT_ID)
            .build();
    final B2ListBucketsResponse response = new B2ListBucketsResponse(
            listOf(bucket(1))
    );
    when(webifier.listBuckets(ACCOUNT_AUTH, expectedRequest)).thenReturn(response);
    assertEquals(bucket(1), client.getBucketOrNullByName(BUCKET_NAME));
    assertEquals(null, client.getBucketOrNullByName("noSuchBucket"));
}