### Question:
CoapProtocolServer implements ProtocolServer { @Override public CompletableFuture<Void> start(Servient servient) { log.info("Starting on '{}' port '{}'", bindHost, bindPort); if (server != null) { return completedFuture(null); } return runAsync(() -> { server = serverSupplier.get(); server.start(); actualPort = server.getPort(); actualAddresses = addresses.stream() .map(a -> a.replace(":" + bindPort, ":" + actualPort)) .collect(Collectors.toList()); }); } CoapProtocolServer(Config config); @SuppressWarnings({ "java:S107" })  CoapProtocolServer(String bindHost,
                       int bindPort,
                       List<String> addresses,
                       Map<String, ExposedThing> things,
                       Map<String, CoapResource> resources,
                       Supplier<WotCoapServer> serverSupplier,
                       WotCoapServer server,
                       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 getBindPort(); Map<String, ExposedThing> getThings();  }### Answer:
@Test public void startShouldCreateAndStartServer() { when(serverSupplier.get()).thenReturn(coapServer); CoapProtocolServer server = new CoapProtocolServer(bindHost, bindPort, addresses, things, resources, serverSupplier, null, bindPort, addresses); server.start(servient); verify(serverSupplier, timeout(1 * 1000L)).get(); verify(coapServer, timeout(1 * 1000L)).start(); }