public Optional<InetAddress> getRemoteAddress(final LocalAddress localAddress) {
    return Optional.ofNullable(remoteChannelsByLocalAddress.get(localAddress))
        .map(remoteChannel -> remoteChannel.attr(REMOTE_ADDRESS_ATTRIBUTE_KEY).get());
  }
@Test
  void getRemoteAddress() {
    clientConnectionManager.handleConnectionEstablished(localChannel, remoteChannel, Optional.empty());

    assertEquals(Optional.empty(),
        clientConnectionManager.getRemoteAddress(localChannel.localAddress()));

    final InetAddress remoteAddress = InetAddresses.forString("6.7.8.9");
    remoteChannel.attr(ClientConnectionManager.REMOTE_ADDRESS_ATTRIBUTE_KEY).set(remoteAddress);

    assertEquals(Optional.of(remoteAddress),
        clientConnectionManager.getRemoteAddress(localChannel.localAddress()));
  }