@Test
public void should_fail_to_appendBlock_when_too_large_total_payload() throws Exception {

    bwReq.appendBlock(newCoapPacket(LOCAL_5683).block1Req(0, BlockSize.S_1024_BERT, true).payload(new byte[4096]).put().build());
    bwReq.appendBlock(newCoapPacket(LOCAL_5683).block1Req(4, BlockSize.S_1024_BERT, true).payload(new byte[4096]).put().build());
    assertThatThrownBy(() ->
            bwReq.appendBlock(newCoapPacket(LOCAL_5683).block1Req(8, BlockSize.S_1024_BERT, false).payload(new byte[2000]).put().build())
    ).isExactlyInstanceOf(CoapRequestEntityTooLarge.class);
}