### Question:
Template { @Override public int hashCode() { Integer hc = hash; if( hc == null ) { hc = toString().hashCode(); hash = hc; } return hc; } Template(
      String original,
      Scheme scheme,
      boolean hasScheme,
      Username username,
      Password password,
      Host host,
      Port port,
      boolean hasAuthority,
      boolean isAuthorityOnly,
      List<Path> path,
      boolean isAbsolute,
      boolean isDirectory,
      Map<String,Query> query,
      Query extra,
      boolean hasQuery,
      Fragment fragment,
      boolean hasFragment ); String getPattern(); Scheme getScheme(); boolean hasScheme(); Username getUsername(); Password getPassword(); Host getHost(); Port getPort(); boolean hasAuthority(); boolean isAuthorityOnly(); List<Path> getPath(); boolean isAbsolute(); boolean isDirectory(); Map<String,Query> getQuery(); Query getExtra(); boolean hasQuery(); Fragment getFragment(); boolean hasFragment(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object object );  }### Answer:
@Test public void testHashCode() throws Exception { Template t1 = Parser.parseTemplate( "scheme: Template t2 = Parser.parseTemplate( "scheme: Template t3 = Parser.parseTemplate( "scheme: assertThat( t1.hashCode(), equalTo( t2.hashCode() ) ); assertThat( t1.hashCode(), not( equalTo( t3.hashCode() ) ) ); }