### Question:
HttpProtocolServer implements ProtocolServer { @Override public CompletableFuture<Void> destroy(ExposedThing thing) { if (!started) { return completedFuture(null); } log.info("HttpServer on '{}' port '{}' stop exposing '{}' at http: bindHost, actualPort, thing.getId()); things.remove(thing.getId()); return completedFuture(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 destroyShouldRemoveThing() { when(thing.getId()).thenReturn("counter"); HttpProtocolServer server = new HttpProtocolServer(bindHost, bindPort, addresses, httpServer, things, security, securityScheme, true, bindPort, addresses); server.destroy(thing); verify(things, timeout(1 * 1000L)).remove("counter"); }