@Test
public void build_throwsException_whenProxySetAndUsernameNull() {

  GoogleCloudStorageOptions.Builder builder =
      GoogleCloudStorageOptions.builder()
          .setProxyAddress("proxy-address")
          .setProxyPassword(RedactedString.create("proxy-password"))
          .setProxyUsername(null);
  IllegalArgumentException e = assertThrows(IllegalArgumentException.class, builder::build);
  assertThat(e)
      .hasMessageThat()
      .isEqualTo("both proxyUsername and proxyPassword should be null or not null together");
}