### Question:
BlockWiseCallback implements RequestCallback { static BlockOption nextBertBlock(BlockOption blockOption, int fullPayloadSize, int lastBlocksCountPerMessage, int maxPayloadSizePerBlock) { int nextBlockNumber = blockOption.getNr() + (blockOption.isBert() ? lastBlocksCountPerMessage : 1); int nextPayloadPos = nextBlockNumber * blockOption.getSize(); int leftPayload = fullPayloadSize - nextPayloadPos; boolean newHasMore = blockOption.isBert() ? leftPayload > maxPayloadSizePerBlock : leftPayload > blockOption.getSize(); return new BlockOption(nextBlockNumber, blockOption.getBlockSize(), newHasMore); } BlockWiseCallback(Consumer<BlockWiseCallback> makeRequestFunc, CoapTcpCSM csm, CoapPacket request, RequestCallback reqCallback, int maxIncomingBlockTransferSize); @Override void call(CoapPacket response); @Override void callException(Exception ex); @Override void onSent();  }### Answer:
@Test public void should_create_next_bert_block_option() { assertEquals(new BlockOption(2, S_512, true), BlockWiseCallback.nextBertBlock(new BlockOption(1, S_512, true), 2000, 1, 1000)); assertEquals(new BlockOption(4, S_512, false), BlockWiseCallback.nextBertBlock(new BlockOption(3, S_512, true), 2000, 1, 1000)); assertEquals(new BlockOption(2, S_1024_BERT, true), BlockWiseCallback.nextBertBlock(new BlockOption(0, S_1024_BERT, true), 10000, 2, 3000)); }