AbstractExpressionEvaluator implements ExpressionEvaluator { protected String getSimpleTypeNodeTextValue(JsonNode jsonNode) { if (!isSimpleTypeNode(jsonNode)) { throw new IllegalArgumentException("Parameter does not contains a simple type"); } return jsonNode.get(VALUE).textValue(); }  @Override Object evaluateLiteralExpression(String rawExpression, String className, List<String> genericClasses); @Override boolean evaluateUnaryExpression(String rawExpression, Object resultValue, Class<?> resultClass);  }
@Test public void getSimpleTypeNodeTextValue() { Assertions.assertThatThrownBy(() -> expressionEvaluatorLocal.getSimpleTypeNodeTextValue(new ArrayNode(factory))) .isInstanceOf(IllegalArgumentException.class) .hasMessage("Parameter does not contains a simple type"); ObjectNode jsonNode = new ObjectNode(factory); jsonNode.set(VALUE, new TextNode("testValue")); assertEquals("testValue", expressionEvaluatorLocal.getSimpleTypeNodeTextValue(jsonNode)); jsonNode.set(VALUE, new IntNode(10)); assertNull(expressionEvaluatorLocal.getSimpleTypeNodeTextValue(jsonNode)); }