@Test
public void simpleTest() {

    String contractSrc =
            "contract Adder {" +
            "  function add(int a, int b) returns (int) {return a + b;}" +
            "}";
    HashMapDB<byte[]> txDb = new HashMapDB<>();
    StandaloneBlockchain bc = new StandaloneBlockchain();
    bc.getBlockchain().withTransactionStore(new TransactionStore(txDb));
    SolidityContract contract = bc.submitNewContract(contractSrc);
    bc.createBlock();
    contract.callFunction("add", 555, 222);
    Block b2 = bc.createBlock();
    contract.callFunction("add", 333, 333);
    Block b3 = bc.createBlock();
    Transaction tx1 = b2.getTransactionsList().get(0);
    TransactionInfo tx1Info = bc.getBlockchain().getTransactionInfo(tx1.getHash());
    byte[] executionResult = tx1Info.getReceipt().getExecutionResult();
    Assert.assertArrayEquals(DataWord.of(777).getData(), executionResult);
    System.out.println(txDb.keys().size());
    bc.getBlockchain().flush();
    System.out.println(txDb.keys().size());
    TransactionStore txStore = new TransactionStore(txDb);
    TransactionInfo tx1Info_ = txStore.get(tx1.getHash()).get(0);
    executionResult = tx1Info_.getReceipt().getExecutionResult();
    Assert.assertArrayEquals(DataWord.of(777).getData(), executionResult);
    TransactionInfo highIndex = new TransactionInfo(tx1Info.getReceipt(), tx1Info.getBlockHash(), 255);
    TransactionInfo highIndexCopy = new TransactionInfo(highIndex.getEncoded());
    Assert.assertArrayEquals(highIndex.getBlockHash(), highIndexCopy.getBlockHash());
    Assert.assertEquals(highIndex.getIndex(), highIndexCopy.getIndex());
}