@Test
public void testDeliveryListener_timeout() throws CoapException {

    ObservationListener obsListener = mock(ObservationListener.class);
    assertNotNull(client.resource("/obs").sync().observe(obsListener));
    client.close();
    NotificationDeliveryListener delivListener = mock(NotificationDeliveryListener.class);
    obsResource.setBody("", delivListener);
    verify(delivListener, timeout(3000)).onFail(any(InetSocketAddress.class));
    verify(delivListener, never()).onSuccess(any(InetSocketAddress.class));
    verify(delivListener, never()).onNoObservers();
}