### Question:
CharsetPreference implements Comparable<CharsetPreference> { @Override public boolean equals(final Object obj) { boolean result=false; if(obj instanceof CharsetPreference) { final CharsetPreference that=(CharsetPreference)obj; result= Objects.equals(this.charset, that.charset) && Objects.equals(this.weight, that.weight); } return result; } 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 testEquals$equal() { CharsetPreference one=CharsetPreference.wildcard(); CharsetPreference other=CharsetPreference.wildcard(); assertThat(one,equalTo(other)); }