protected static boolean equals(@Nullable MediaType first, @Nullable MediaType second) {
    String s1 = first == null ? null : first.toString().toLowerCase(ENGLISH).replace(" ", "");
    String s2 = second == null ? null : second.toString().toLowerCase(ENGLISH).replace(" ", "");
    return s1 != null && s2 != null && s1.equals(s2);
  }
@Test
  public void check_mediaTypes_equality() {
    assertThat(underTest.equals(null, null)).isFalse();
    assertThat(underTest.equals(MediaType.parse("application/json"), null)).isFalse();
    assertThat(underTest.equals(null, MediaType.parse("application/json"))).isFalse();
    assertThat(underTest.equals(MediaType.parse("application/ json"), MediaType.parse("text/html; charset=UTF-8"))).isFalse();
    assertThat(underTest.equals(MediaType.parse("application/Json"), MediaType.parse("application/JSON"))).isTrue();
  }