### Question:
WebsocketProtocolServer implements ProtocolServer { @Override public CompletableFuture<Void> destroy(ExposedThing thing) { if (serverChannel == null) { return completedFuture(null); } log.info("WebsocketServer stop exposing '{}'", thing.getTitle()); things.remove(thing.getId()); return completedFuture(null); } WebsocketProtocolServer(Config config);   WebsocketProtocolServer(ServerBootstrap serverBootstrap,
                            EventLoopGroup serverBossGroup,
                            EventLoopGroup serverWorkerGroup,
                            Map<String, ExposedThing> things,
                            List<String> addresses,
                            int bindPort,
                            Channel serverChannel); @Override CompletableFuture<Void> start(Servient servient); @Override CompletableFuture<Void> stop(); @Override CompletableFuture<Void> expose(ExposedThing thing); @Override CompletableFuture<Void> destroy(ExposedThing thing);  }### Answer:
@Test public void destroyShouldRemoveThing() { when(thing.getId()).thenReturn("counter"); WebsocketProtocolServer server = new WebsocketProtocolServer(serverBootstrap, serverBossGroup, serverWorkerGroup, things, List.of("ws: server.destroy(thing); verify(things, timeout(1 * 1000L)).remove("counter"); }