### Question:
CharsetPreference implements Comparable<CharsetPreference> { @Override public int hashCode() { return Objects.hash(this.charset,this.weight); } CharsetPreference(final String charset, final int weight); String charset(); double weight(); boolean isWildcard(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString(); @Override int compareTo(final CharsetPreference o); static CharsetPreference valueOf(final String str); static CharsetPreference wildcard(); static CharsetPreference wildcard(final double weight); static CharsetPreference create(final Charset charset); static CharsetPreference create(final Charset charset, final double weight);  }### Answer:
@Test public void testHashCode$equal() { CharsetPreference one=CharsetPreference.wildcard(); CharsetPreference other=CharsetPreference.wildcard(); assertThat(one.hashCode(),equalTo(other.hashCode())); }