@Test
public void tryToMapBooleanWithIntFieldDefinition() {

    final Class<Integer> valueType = Integer.class;
    final JsonValue boolJsonValue = JsonFactory.newValue(true);
    final JavaValueFieldDefinition<Integer> underTest =
            JavaValueFieldDefinition.newInstance(KNOWN_JSON_POINTER, valueType, JsonValue::isNumber,
                    JsonValue::asInt);
    assertThatExceptionOfType(JsonParseException.class)
            .isThrownBy(() -> underTest.mapValue(boolJsonValue))
            .withMessage("Value <%s> for <%s> is not of type <%s>!", boolJsonValue, KNOWN_JSON_POINTER,
                    valueType.getSimpleName())
            .withNoCause();
}