@Test
public void testParseProxyAddressInvalidSyntax() throws Exception {

  String address = "foo-host-with-illegal-char^:1234";
  IllegalArgumentException thrown =
      assertThrows(
          IllegalArgumentException.class, () -> HttpTransportFactory.parseProxyAddress(address));
  assertThat(thrown)
      .hasMessageThat()
      .contains("Invalid proxy address 'foo-host-with-illegal-char^:1234'.");
}