@Test
public void testSetConnection(){

    P2PConnection connection = new P2PConnection("testConnection", mock(Peer.class), mock(PeerDHT.class));
    appState.setConnection(connection);
    Assert.assertEquals(connection, appState.getConnection());
}