@Test public void testSomeMethod() { Link google = new Link(); google.setUrl("https: assertEquals("drive.google.com", google.getHost()); }
public String getHost() { try { String host = new URI(this.url).getHost(); if (host != null && host.startsWith("www")) { host = host.substring(4); } return host; } catch (URISyntaxException ex) { return null; } }
Link extends BaseObject implements Comparable<Link> { public String getHost() { try { String host = new URI(this.url).getHost(); if (host != null && host.startsWith("www")) { host = host.substring(4); } return host; } catch (URISyntaxException ex) { return null; } } }
Link extends BaseObject implements Comparable<Link> { public String getHost() { try { String host = new URI(this.url).getHost(); if (host != null && host.startsWith("www")) { host = host.substring(4); } return host; } catch (URISyntaxException ex) { return null; } } Link();  Link(String url); }
Link extends BaseObject implements Comparable<Link> { public String getHost() { try { String host = new URI(this.url).getHost(); if (host != null && host.startsWith("www")) { host = host.substring(4); } return host; } catch (URISyntaxException ex) { return null; } } Link();  Link(String url); static String sanatizeUrl(String url); void addLabel(String label); void addLabels(Collection<String> labels); @Override int compareTo(Link o); @Override boolean equals(Object obj); String getFormattedCreationDate(); String getFormattedLastCheckDate(); String getFormattedLastVisit(); String getHost(); String getRedirectUrl(); boolean hasKeyword(String keyword); boolean hasKeywordInLabel(String keyword); @Override int hashCode(); void moveLabel(String oldLabel, String newLabel); void removeLabel(String label); void setLabels(Collection<String> labels); void visited(); }
Link extends BaseObject implements Comparable<Link> { public String getHost() { try { String host = new URI(this.url).getHost(); if (host != null && host.startsWith("www")) { host = host.substring(4); } return host; } catch (URISyntaxException ex) { return null; } } Link();  Link(String url); static String sanatizeUrl(String url); void addLabel(String label); void addLabels(Collection<String> labels); @Override int compareTo(Link o); @Override boolean equals(Object obj); String getFormattedCreationDate(); String getFormattedLastCheckDate(); String getFormattedLastVisit(); String getHost(); String getRedirectUrl(); boolean hasKeyword(String keyword); boolean hasKeywordInLabel(String keyword); @Override int hashCode(); void moveLabel(String oldLabel, String newLabel); void removeLabel(String label); void setLabels(Collection<String> labels); void visited();  }