@Test
public void testPatchObject() throws Exception {

  StorageObject object = new StorageObject().setName(OBJECT_NAME);
  Storage.Objects.Patch patch = newStorage().objects().patch(BUCKET_NAME, OBJECT_NAME, object);
  StorageRequestAuthorizer authorizer = new StorageRequestAuthorizer(mockHandler);
  authorizer.authorize(patch);
  ArgumentCaptor<URI> captor = ArgumentCaptor.forClass(URI.class);
  verify(mockHandler).handlePatchObject(captor.capture());
  assertThat(captor.getValue().getAuthority()).isEqualTo(BUCKET_NAME);
  assertThat(captor.getValue().getPath()).isEqualTo(OBJECT_NAME);
}