@Test
public void detectsInvalidQuotedEscapes() {

    RuntimeException e = Assertions.assertThrows(
            RuntimeException.class, () -> MediaType.from("application/json; foo=\"bar\\"));
    assertThat(e.getMessage(), containsString("Expected character after escape"));
}