@Test
public void discover() {

    ServerConnection connection = ServerConnection.getInstance();
    Whitebox.setInternalState(connection, "connectionsClient", mockClient);
    assertNotEquals(null, Whitebox.getInternalState(connection, "connectionsClient"));
    ConnectCallback callback = new ConnectCallback() {
        @Override
        public void success(String message) {
            // nothing needed, check in assert
        }
        @Override
        public void failure(String message) {
            // nothing needed, check in assert
        }
    };
    connection.discover(callback, connection.buildEndpointDiscoveryCallback("", callback));
    List<String> expected = Arrays.asList("endName", "endName2", "endNameD1");
    assertEquals(expected, connection.getClients());
}