@Test
public void checkExceptionHandlingWithCustomDittoJsonHandler() {

    final String invalidJsonObjectString = "{\"foo\":123";
    final DittoJsonHandler<?, ?, ?> jsonHandlerMock = Mockito.mock(DittoJsonHandler.class);
    final Consumer<String> underTest = JsonValueParser.fromString(jsonHandlerMock);
    assertThatExceptionOfType(JsonParseException.class)
            .isThrownBy(() -> underTest.accept(invalidJsonObjectString))
            .withMessage("Failed to parse JSON string '%s'!", invalidJsonObjectString)
            .withCauseExactlyInstanceOf(com.eclipsesource.json.ParseException.class);
}