### Question:
JadexProtocolServer implements ProtocolServer { @Override public CompletableFuture<Void> expose(ExposedThing thing) { log.info("JadexServer exposes '{}'", thing.getId()); if (platform == null) { return failedFuture(new ProtocolServerException("Unable to expose thing before JadexServer has been started")); } things.put(thing.getId(), thing); CompletableFuture<IExternalAccess> expose = FutureConverters.fromJadex(thingsService.expose(thing.getId())); return expose.thenApply(r -> null); } JadexProtocolServer(Config config);   JadexProtocolServer(RefCountResource<IExternalAccess> platformProvider,
                        IExternalAccess platform,
                        ThingsService thingsService,
                        Map<String, ExposedThing> things); @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 exposeShouldInstructThingsAgentToExposeThing() { when(thing.getId()).thenReturn("counter"); when(thingsService.expose(any())).thenReturn(mock(IFuture.class)); JadexProtocolServer server = new JadexProtocolServer(platformProvider, platform, thingsService, things); server.expose(thing); verify(thingsService).expose("counter"); }