@Test
public void connectTo() {

    ServerConnection connection = ServerConnection.getInstance();
    Whitebox.setInternalState(connection, "connectionsClient", mockClient);
    ConnectCallback callback = new ConnectCallback() {
        @Override
        public void success(String message) {
            // check in asserts
        }
        @Override
        public void failure(String message) {
            fail("Failed to connect");
        }
    };
    connection.discover(callback, connection.buildEndpointDiscoveryCallback("", callback));
    connection.connectTo("me",  callback);
    assertEquals("test", connection.getClientID());
}