### Question:
JsonRpcHttpService { public InetSocketAddress socketAddress() { if (httpServer == null) { return EMPTY_SOCKET_ADDRESS; } return new InetSocketAddress(config.getHost(), httpServer.actualPort()); } JsonRpcHttpService(
      final Vertx vertx,
      final Path dataDir,
      final JsonRpcConfiguration config,
      final MetricsSystem metricsSystem,
      final NatService natService,
      final Map<String, JsonRpcMethod> methods,
      final HealthService livenessService,
      final HealthService readinessService); private  JsonRpcHttpService(
      final Vertx vertx,
      final Path dataDir,
      final JsonRpcConfiguration config,
      final MetricsSystem metricsSystem,
      final NatService natService,
      final Map<String, JsonRpcMethod> methods,
      final Optional<AuthenticationService> authenticationService,
      final HealthService livenessService,
      final HealthService readinessService); CompletableFuture<?> start(); CompletableFuture<?> stop(); InetSocketAddress socketAddress(); @VisibleForTesting String url(); @VisibleForTesting final Optional<AuthenticationService> authenticationService; }### Answer:
@Test public void getSocketAddressWhenActive() { final InetSocketAddress socketAddress = service.socketAddress(); assertThat("127.0.0.1").isEqualTo(socketAddress.getAddress().getHostAddress()); assertThat(socketAddress.getPort() > 0).isTrue(); }