@Test
public void testBadTransactions() throws Exception {

    Block block = new Block(params, blockBytes);
    // Re-arrange so the coinbase transaction is not first.
    Transaction tx1 = block.transactions.get(0);
    Transaction tx2 = block.transactions.get(1);
    block.transactions.set(0, tx2);
    block.transactions.set(1, tx1);
    try {
        block.verify();
        fail();
    } catch (VerificationException e) {
        // We should get here.
    }
}