@Test
public void shouldFailIfSubtypeIsMalformed() throws Exception {

    final MediaType mediaType = new MediaType(
            "application",
            "json");
    try {
        nameToMediaTypeConverter.convert(mediaType);
        fail();
    } catch (final MalformedMediaTypeNameException expected) {
        assertThat(expected.getMessage(), is("Failed to extract Name from media type 'application/json'"));
    }
}