### Question:
HttpProtocolServer implements ProtocolServer { @Override public URI getThingUrl(String id) { try { return new URI(actualAddresses.get(0)).resolve("/" + id); } catch (URISyntaxException e) { log.warn("Unable to thing url", e); return null; } } HttpProtocolServer(Config config); @SuppressWarnings({ "java:S107" })  HttpProtocolServer(String bindHost,
                       int bindPort,
                       List<String> addresses,
                       Service server,
                       Map<String, ExposedThing> things,
                       Map<String, Object> security,
                       String securityScheme,
                       boolean started,
                       int actualPort,
                       List<String> actualAddresses); @Override String toString(); @Override CompletableFuture<Void> start(Servient servient); @Override CompletableFuture<Void> stop(); @Override CompletableFuture<Void> expose(ExposedThing thing); @Override CompletableFuture<Void> destroy(ExposedThing thing); @Override URI getDirectoryUrl(); @Override URI getThingUrl(String id); int getPort();  }### Answer:
@Test public void getThingUrl() throws URISyntaxException { when(addresses.get(0)).thenReturn("http: HttpProtocolServer server = new HttpProtocolServer(bindHost, bindPort, addresses, httpServer, things, security, securityScheme, true, bindPort, addresses); assertEquals(new URI("http: }