ProxyHelper { static String getHost( String url ) { log.debug( "getHost( url = '{}' )", url ); String host = ""; try { URL u = new URL( url ); host = u.getHost( ); } catch ( MalformedURLException e ) { String message = String.format( "Failed to parse URL '%s'", url ); log.warn( message, e ); } log.debug( "getHost( ): host = '{}'", host ); return host; } private  ProxyHelper(  ); static Proxy getProxy( String url ); static final String DEFAULT_PROTOCOL; }
@Test public void testGetHost( ) { String host = ProxyHelper.getHost( SOURCE_URL ); assertEquals( "host", HOST, host ); }