@Test
public void should_fail_transfer_when_too_large_total_response_payload() throws CoapException {

    bwc = new BlockWiseCallback(makeRequestFunc, new CoapTcpCSM(1024, true),
            coap().get().build(), callback, 1000);
    receive(coap().block2Res(0, S_512, true).payload(new byte[512]).ack(C205_CONTENT));
    assertSent(coap().block2Res(1, S_512, false).get());
    //when
    receive(coap().block2Res(1, S_512, true).payload(new byte[512]));
    //then, fail
    assertNothingSent();
    verify(callback).callException(isA(CoapBlockTooLargeEntityException.class));
}