### Question:
CoapServer { public final CompletableFuture<CoapPacket> makeRequest(CoapPacket requestPacket) { return makeRequest(requestPacket, TransportContext.NULL); } CoapServer(CoapMessaging coapMessaging); static CoapServerBuilder.CoapServerBuilderForUdp builder(); static CoapServerBuilder.CoapServerBuilderForTcp builderForTcp(); synchronized CoapServer start(); final synchronized void stop(); boolean isRunning(); void addRequestHandler(String uri, CoapHandler coapHandler); void removeRequestHandler(CoapHandler requestHandler); InetSocketAddress getLocalSocketAddress(); final CompletableFuture<CoapPacket> makeRequest(CoapPacket requestPacket); final CompletableFuture<CoapPacket> makeRequest(CoapPacket requestPacket, final TransportContext transContext); final void makeRequest(CoapPacket packet, Callback<CoapPacket> callback); void makeRequest(final CoapPacket packet, final Callback<CoapPacket> callback, final TransportContext transContext); void sendNotification(final CoapPacket notifPacket, final Callback<CoapPacket> callback, final TransportContext transContext); void ping(InetSocketAddress destination, final Callback<CoapPacket> callback); void setObservationHandler(ObservationHandler observationHandler); void setConnectHandler(Consumer<InetSocketAddress> disconnectConsumer); void useCriticalOptionTest(boolean enable); CoapHandler getResourceLinkResource(); List<LinkFormat> getResourceLinks(); void sendResponse(CoapExchange exchange); byte[] observe(String uri, InetSocketAddress destination, final Callback<CoapPacket> respCallback, byte[] token, TransportContext transportContext); byte[] observe(CoapPacket request, final Callback<CoapPacket> respCallback, TransportContext transportContext); void setObservationIDGenerator(ObservationIDGenerator observationIDGenerator); CoapMessaging getCoapMessaging();  }### Answer:
@Test public void shouldPassMakeRequest_toMessaging() throws ExecutionException, InterruptedException { final CoapPacket req = newCoapPacket().get().uriPath("/test").build(); final ArgumentCaptor<Callback> callback = ArgumentCaptor.forClass(Callback.class); final CompletableFuture<CoapPacket> resp = server.makeRequest(req); verify(msg).makeRequest(eq(req), callback.capture(), eq(TransportContext.NULL)); assertFalse(resp.isDone()); callback.getValue().call(newCoapPacket().ack(Code.C400_BAD_REQUEST).build()); assertTrue(resp.isDone()); assertEquals(Code.C400_BAD_REQUEST, resp.get().getCode()); }