ConstantExpression extends EvaluationExpression { public IJsonNode getConstant() { return this.constant; } ConstantExpression(final IJsonNode constant);  ConstantExpression(final Object constant); IJsonNode getConstant(); @Override boolean equals(final Object obj); @Override IJsonNode evaluate(final IJsonNode node, final IJsonNode target, final EvaluationContext context); @Override int hashCode(); @Override void toString(final StringBuilder builder); static final EvaluationExpression MISSING; static final EvaluationExpression NULL; }
@Test public void shouldCastNumericNodeCorrectly() { final Object result = new ConstantExpression(IntNode.valueOf(42)).getConstant().getJavaValue(); Assert.assertEquals(42, result); }