@Test
public void shouldBeHasheable() {

    final HashSet<ContentType> contentTypes = new HashSet<>();
    contentTypes.add(ContentType.APPLICATION_JSON);
    contentTypes.add(ContentType.TEXT_PLAIN);
    contentTypes.add(ContentType.valueOf("application/octet-stream"));
    assertEquals(3, contentTypes.size());
    assertTrue(contentTypes.contains(ContentType.valueOf("application/json")));
    assertTrue(contentTypes.contains(ContentType.valueOf("text/plain")));
    assertTrue(contentTypes.contains(ContentType.valueOf("application/octet-stream")));
}