@Test
public void should_receive_onSent_callback_when_message_is_sent() throws Exception {

    initServer();
    RequestCallback callback = mock(RequestCallback.class);
    CompletableFuture<Boolean> fut = new CompletableFuture<>();
    given(coapTransport.sendPacket(any(), any(), any())).willReturn(fut);
    udpMessaging.makeRequest(newCoapPacket(LOCAL_1_5683).con().get().uriPath("/test").build(), callback, TransportContext.NULL);
    verify(callback, never()).onSent();
    fut.complete(true);
    verify(callback).onSent();
}