### Question:
PbftBlockChain implements ConsensusBlockChain<PbftProto.PbftBlock, PbftMessage> { @Override public Map<String, List<String>> addBlock(ConsensusBlock<PbftProto.PbftBlock> block) { blockChainManagerMock.addBlock(block); this.blockKeyStore.put(block.getIndex(), block.getHash().getBytes()); loggingBlock((PbftBlock) block); return new HashMap<>(); } PbftBlockChain(Block genesisBlock, String dbPath,
                          String blockKeyStorePath, String blockStorePath); @Override BranchId getBranchId(); @Override Consensus getConsensus(); @Override PbftBlockKeyStore getBlockKeyStore(); @Override BlockChainManager<PbftProto.PbftBlock> getBlockChainManager(); @Override ContractManager getContractManager(); @Override PbftBlock getGenesisBlock(); @Override Map<String, PbftMessage> getUnConfirmedData(); @Override ReentrantLock getLock(); @Override Map<String, List<String>> addBlock(ConsensusBlock<PbftProto.PbftBlock> block); @Override Map<String, List<String>> addBlock(ConsensusBlock<PbftProto.PbftBlock> block, boolean broadcast); @Override boolean isValidator(String addr); @Override ValidatorSet getValidators();  }### Answer:
@Test public void addBlockTest() { this.pbftBlockChain.addBlock(pbftBlock1); assertEquals(1L, this.blockChainManager.getLastIndex()); this.pbftBlockChain.addBlock(pbftBlock2); assertEquals(2L, this.blockChainManager.getLastIndex()); this.pbftBlockChain.addBlock(pbftBlock3); assertEquals(3L, this.blockChainManager.getLastIndex()); }