@Test
public void testStopPersistenceUnit() throws IOException {

    CustomTestBlockchain chain = new CustomTestBlockchain(new BlockchainContext());
    chain.stopPersistenceUnit();
    for(BlockchainUnitType type : blockchainUnitTypes)
    {
        BlockchainPersistenceUnit<?, ?> persistenceUnit = chain.getUnit(type);
        verify(persistenceUnit,  times(1)).close();
    }
}