@Test
public void testUpdateBucket() throws B2Exception {

    final B2UpdateBucketRequest request = B2UpdateBucketRequest
            .builder(bucket(1))
            .setBucketInfo(B2Collections.mapOf())
            .setLifecycleRules(listOf())
            .setBucketType(B2BucketTypes.ALL_PUBLIC)
            .build();
    when(webifier.updateBucket(anyObject(), eq(request))).thenReturn(bucket(1));
    assertEquals(bucket(1), client.updateBucket(request));
    verify(webifier, times(1)).updateBucket(anyObject(), eq(request));
    // for coverage
    //noinspection ResultOfMethodCallIgnored
    request.hashCode();
    assertEquals(
            request,
            B2UpdateBucketRequest
                    .builder(bucket(1))
                    .setBucketInfo(B2Collections.mapOf())
                    .setLifecycleRules(listOf())
                    .setBucketType(B2BucketTypes.ALL_PUBLIC)
                    .build());
}