### Question:
NodeBlockProcessor implements BlockProcessor { @Override public void processBodyRequest(@Nonnull final MessageChannel sender, long requestId, @Nonnull final byte[] hash) { logger.trace("Processing body request {} {} from {}", requestId, Hex.toHexString(hash).substring(0, 10), sender.getPeerNodeID()); final Block block = blockSyncService.getBlockFromStoreOrBlockchain(hash); if (block == null) { return; } Message responseMessage = new BodyResponseMessage(requestId, block.getTransactionsList(), block.getUncleList()); sender.sendMessage(responseMessage); } NodeBlockProcessor(
            @Nonnull final BlockStore store,
            @Nonnull final Blockchain blockchain,
            @Nonnull final BlockNodeInformation nodeInformation,
            @Nonnull final BlockSyncService blockSyncService,
            @Nonnull final SyncConfiguration syncConfiguration); @Override @Nonnull Blockchain getBlockchain(); @Override boolean isAdvancedBlock(long blockNumber); @Override void processNewBlockHashesMessage(@Nonnull final MessageChannel sender, @Nonnull final NewBlockHashesMessage message); @Override void processBlockHeaders(@Nonnull final MessageChannel sender, @Nonnull final List<BlockHeader> blockHeaders); @Override void processGetBlock(@Nonnull final MessageChannel sender, @Nonnull final byte[] hash); @Override void processBlockRequest(@Nonnull final MessageChannel sender, long requestId, @Nonnull final byte[] hash); @Override void processBlockHeadersRequest(@Nonnull final MessageChannel sender, long requestId, @Nonnull final byte[] hash, int count); @Override void processBodyRequest(@Nonnull final MessageChannel sender, long requestId, @Nonnull final byte[] hash); @Override void processBlockHashRequest(@Nonnull final MessageChannel sender, long requestId, long height); @Override void processSkeletonRequest(@Nonnull final MessageChannel sender, long requestId, long startNumber); @Override boolean canBeIgnoredForUnclesRewards(long blockNumber); @Override BlockNodeInformation getNodeInformation(); long getBestBlockNumber(); @Override boolean hasBlock(@Nonnull final byte[] hash); @Override boolean hasBlockInProcessorStore(@Nonnull final byte[] hash); @Override BlockProcessResult processBlock(@Nullable final MessageChannel sender, @Nonnull final Block block); @Override boolean hasBlockInSomeBlockchain(@Nonnull final byte[] hash); @Override boolean hasBetterBlockToSync(); @Override long getLastKnownBlockNumber();  }### Answer:
@Test public void processBodyRequestMessageUsingBlockInBlockchain() throws UnknownHostException { final Blockchain blockchain = BlockChainBuilder.ofSize(10); final Block block = blockchain.getBlockByNumber(3); final BlockStore store = new BlockStore(); BlockNodeInformation nodeInformation = new BlockNodeInformation(); SyncConfiguration syncConfiguration = SyncConfiguration.IMMEDIATE_FOR_TESTING; TestSystemProperties config = new TestSystemProperties(); BlockSyncService blockSyncService = new BlockSyncService(config, store, blockchain, nodeInformation, syncConfiguration); final NodeBlockProcessor processor = new NodeBlockProcessor(store, blockchain, nodeInformation, blockSyncService, syncConfiguration); final SimpleMessageChannel sender = new SimpleMessageChannel(); processor.processBodyRequest(sender, 100, block.getHash().getBytes()); Assert.assertFalse(sender.getMessages().isEmpty()); Assert.assertEquals(1, sender.getMessages().size()); final Message message = sender.getMessages().get(0); Assert.assertEquals(MessageType.BODY_RESPONSE_MESSAGE, message.getMessageType()); final BodyResponseMessage bMessage = (BodyResponseMessage) message; Assert.assertEquals(100, bMessage.getId()); Assert.assertEquals(block.getTransactionsList(), bMessage.getTransactions()); Assert.assertEquals(block.getUncleList(), bMessage.getUncles()); }