### Question:
AbstractNatManager implements NatManager { @Override public CompletableFuture<String> queryLocalIPAddress() { final CompletableFuture<String> future = new CompletableFuture<>(); Executors.newCachedThreadPool() .submit( () -> { try { future.complete(InetAddress.getLocalHost().getHostAddress()); } catch (UnknownHostException e) { future.completeExceptionally(e); } }); return future; } protected  AbstractNatManager(final NatMethod natMethod); @Override NatMethod getNatMethod(); @Override boolean isStarted(); @Override CompletableFuture<String> queryExternalIPAddress(); @Override CompletableFuture<String> queryLocalIPAddress(); @Override void start(); @Override void stop(); @Override NatPortMapping getPortMapping(
      final NatServiceType serviceType, final NetworkProtocol networkProtocol);  }### Answer:
@Test public void assertThatManagerReturnValidLocalIpAddress() throws UnknownHostException, ExecutionException, InterruptedException { final String hostAddress = InetAddress.getLocalHost().getHostAddress(); assertThat(buildNatManager(NatMethod.UPNP).queryLocalIPAddress().get()).isEqualTo(hostAddress); }