@Test
public void testGetConnection() throws IOException {

    BlockchainContext context = mock(BlockchainContext.class);
    P2PConnection p2PConnection = mock(P2PConnection.class);
    when(context.getConnection()).thenReturn(p2PConnection);
    Blockchain blockchain = new Blockchain(context);
    Assert.assertEquals(p2PConnection, blockchain.getConnection());
}