@Test
public void shouldPassMakeRequest_toMessaging() throws ExecutionException, InterruptedException {

    final CoapPacket req = newCoapPacket().get().uriPath("/test").build();
    final ArgumentCaptor<Callback> callback = ArgumentCaptor.forClass(Callback.class);
    //when
    final CompletableFuture<CoapPacket> resp = server.makeRequest(req);
    //then
    verify(msg).makeRequest(eq(req), callback.capture(), eq(TransportContext.NULL));
    assertFalse(resp.isDone());
    //verify callback
    callback.getValue().call(newCoapPacket().ack(Code.C400_BAD_REQUEST).build());
    assertTrue(resp.isDone());
    assertEquals(Code.C400_BAD_REQUEST, resp.get().getCode());
}