@Override
  public Optional<InetAddress> toInetAddress(String hostOrAddress) {
    try {
      if (InetAddresses.isInetAddress(hostOrAddress)) {
        return Optional.of(InetAddresses.forString(hostOrAddress));
      }
      return Optional.of(InetAddress.getByName(hostOrAddress));
    } catch (UnknownHostException e) {
      LOG.trace("toInetAddress({}) failed", hostOrAddress, e);
      return Optional.empty();
    }
  }
@Test
  public void toInetAddress_supports_ipv6() {
    assertThat(underTest.toInetAddress("2a01:e34:ef1f:dbb0:c2f6:a978:c5c0:9ccb")).isNotEmpty();
    assertThat(underTest.toInetAddress("[2a01:e34:ef1f:dbb0:c2f6:a978:c5c0:9ccb]")).isNotEmpty();
  }