### Question:
AbstractMediaTypeExpression implements MediaTypeExpression, Comparable<AbstractMediaTypeExpression> { @Override public int hashCode() { return this.mediaType.hashCode(); } AbstractMediaTypeExpression(String expression);   AbstractMediaTypeExpression(MediaType mediaType, boolean negated); @Override MediaType getMediaType(); @Override boolean isNegated(); @Override int compareTo(AbstractMediaTypeExpression other); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEqualsAndHashCode() { Assert.assertEquals(createExpression(MediaType.APPLICATION_JSON_VALUE), createExpression(MediaType.APPLICATION_JSON_VALUE)); Assert.assertEquals(createExpression(MediaType.APPLICATION_JSON_VALUE).hashCode(), createExpression(MediaType.APPLICATION_JSON_VALUE).hashCode()); }