@Test()
public void failToSendNotificationWithout_missingHeaders() {

    //observation is missing
    assertThatThrownBy(() ->
            server.sendNotification(newCoapPacket(LOCAL_5683).token(11).ack(Code.C205_CONTENT).build(), mock(Callback.class), TransportContext.NULL)
    ).isInstanceOf(IllegalArgumentException.class);
    //token is missing
    assertThatThrownBy(() ->
            server.sendNotification(newCoapPacket(LOCAL_5683).obs(2).ack(Code.C205_CONTENT).build(), mock(Callback.class), TransportContext.NULL)
    ).isInstanceOf(IllegalArgumentException.class);
    //wrong content type
    assertThatThrownBy(() ->
            server.sendNotification(newCoapPacket(LOCAL_5683).token(321).obs(2).ack(Code.C400_BAD_REQUEST).build(), mock(Callback.class), TransportContext.NULL)
    ).isInstanceOf(IllegalArgumentException.class);
}