@Deprecated
  public WritableByteChannel create(GcsPath path, String type) throws IOException {
    CreateOptions.Builder builder = CreateOptions.builder().setContentType(type);
    return create(path, builder.build());
  }
@Test
  public void testCreateWithException() throws IOException {
    GcsOptions gcsOptions = gcsOptionsWithTestCredential();

    GcsUtilMock gcsUtil = GcsUtilMock.createMock(gcsOptions);

    GoogleCloudStorage mockStorage = Mockito.mock(GoogleCloudStorage.class);

    gcsUtil.googleCloudStorage = mockStorage;

    when(mockStorage.create(any(), any())).thenThrow(new RuntimeException("testException"));

    GcsPath path = GcsPath.fromUri("gs://testbucket/testdirectory/otherfile");
    CreateOptions createOptions = CreateOptions.builder().build();

    thrown.expect(RuntimeException.class);
    thrown.expectMessage("testException");

    gcsUtil.create(path, createOptions);
  }