ObjectCreation extends EvaluationExpression { public Mapping<?> getMapping(final int index) { return this.mappings.get(index); } ObjectCreation();  ObjectCreation(final List<Mapping<?>> mappings);  ObjectCreation(final FieldAssignment... mappings); void addMapping(final Mapping<?> mapping); void addMapping(final String target, final EvaluationExpression expression); void addMapping(final EvaluationExpression target, final EvaluationExpression expression); @Override boolean equals(final Object obj); @Override IJsonNode evaluate(final IJsonNode node, final IJsonNode target, final EvaluationContext context); @Override ObjectCreation clone(); @Override @SuppressWarnings({ "rawtypes", "unchecked" }) EvaluationExpression transformRecursively(final TransformFunction function); Mapping<?> getMapping(final int index); List<Mapping<?>> getMappings(); int getMappingSize(); @Override int hashCode(); @Override void toString(final StringBuilder builder); static final ObjectCreation CONCATENATION; }
@Test public void shouldReturnSpecifiedMapping() { final ObjectCreation.Mapping<?> mapping = new ObjectCreation(new ObjectCreation.FieldAssignment("name", new ConstantExpression( TextNode.valueOf("testperson"))), new ObjectCreation.FieldAssignment("age", new ConstantExpression( IntNode.valueOf(30)))).getMapping(1); Assert.assertEquals(new ObjectCreation.FieldAssignment("age", new ConstantExpression(IntNode.valueOf(30))), mapping); }