@Test
public void testShutdown(){

    Blockchain blockchain = mock(Blockchain.class);
    Accounts accounts = mock(Accounts.class);
    appState.setBlockchain(blockchain);
    appState.setAccounts(accounts);
    verify(blockchain, times(0)).stopPersistenceUnit();
    verify(accounts, times(0)).stopPersistenceUnit();
    appState.shutdown();
    verify(blockchain, times(1)).stopPersistenceUnit();
    verify(accounts, times(1)).stopPersistenceUnit();
}