@Test
public void testBlockEvent() {

    try {
        BlockEvent be = new BlockEvent(eventHub, goodEventBlock);
        assertEquals(be.getChannelId(), "TESTCHANNEL");
        assertArrayEquals(be.getBlock().toByteArray(), block.toByteArray());
        List<BlockEvent.TransactionEvent> txList = be.getTransactionEventsList();
        assertEquals(txList.size(), 3);
        BlockEvent.TransactionEvent te = txList.get(1);
        assertFalse(te.isValid());
        assertEquals(te.getValidationCode(), (byte) TxValidationCode.INVALID_OTHER_REASON_VALUE);
        te = txList.get(2);
        assertTrue(te.isValid());
    } catch (InvalidProtocolBufferException e) {
        fail("did not parse Block correctly.Error: " + e.getMessage());
    }
}