### Question:
WebsocketProtocolServer implements ProtocolServer { @Override public CompletableFuture<Void> expose(ExposedThing thing) { log.info("WebsocketServer exposes '{}'", thing.getTitle()); things.put(thing.getId(), thing); for (String address : addresses) { exposeProperties(thing, address); exposeActions(thing, address); exposeEvents(thing, address); } 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 exposeShouldAddFormsToThing() { when(thing.getId()).thenReturn("counter"); when(thing.getProperties()).thenReturn(Map.of("count", property)); when(property.isObservable()).thenReturn(true); when(thing.getActions()).thenReturn(Map.of("reset", action)); when(thing.getEvents()).thenReturn(Map.of("changed", event)); WebsocketProtocolServer server = new WebsocketProtocolServer(serverBootstrap, serverBossGroup, serverWorkerGroup, things, List.of("ws: server.expose(thing); verify(property, timeout(1 * 1000L).times(3)).addForm(any()); verify(action, timeout(1 * 1000L)).addForm(any()); verify(event, timeout(1 * 1000L)).addForm(any()); }