@Test
public void detectsJsonMediaTypes() {

    assertThat(MediaType.isJson("application/json"), is(true));
    assertThat(MediaType.isJson("application/foo+json"), is(true));
    assertThat(MediaType.isJson("foo/json"), is(false));
    assertThat(MediaType.isJson("application/jsonn"), is(false));
    assertThat(MediaType.isJson("application/foo+jsonn"), is(false));
}