HttpConnector { public HttpURLConnection openConnection(URL url, NetworkSettings settings) throws IOException { HttpURLConnection conn = (HttpURLConnection) url.openConnection(settings.getProxy()); configure(conn, settings); return conn; }  static String defaultUserAgent(); HttpURLConnection openConnection(URL url, NetworkSettings settings);  }
@Test @Category(HttpURLConnection.class) public void testOpenConnection() throws IOException { NetworkSettings settings = new NetworkSettings(); HttpConnector connector = new HttpConnector(); HttpURLConnection conn = connector.openConnection(new URL("http: assertThat(conn, not(nullValue())); conn.connect(); assertThat(conn.getResponseCode(), is(HttpURLConnection.HTTP_OK)); }