@Test public void testContructorsSimpleVersionDueStrangeBehaviorAbove() { List<PartialUpdateExpression> list = new ArrayList<>(); PartialUpdateExpression elem = new PartialUpdateExpression() { @Override public JsonNode toJson() { throw new UnsupportedOperationException("Not supported"); } }; list.add(elem); list.add(elem); list.add(elem); UpdateExpressionList iList = new UpdateExpressionList(list); UpdateExpressionList iArray = new UpdateExpressionList(elem, elem, elem); assertEquals("The size of the instances are different", iList.getList().size(), iArray.getList().size()); assertEquals(3, iList.getList().size()); assertEquals("The element is diffent (maybe in a different order)", iList.getList().get(0), iArray.getList().get(0)); assertEquals("The element is diffent (maybe in a different order)", iList.getList().get(1), iArray.getList().get(1)); assertEquals("The element is diffent (maybe in a different order)", iList.getList().get(2), iArray.getList().get(2)); }
public List<PartialUpdateExpression> getList() { return list; }
UpdateExpressionList extends UpdateExpression { public List<PartialUpdateExpression> getList() { return list; } }
UpdateExpressionList extends UpdateExpression { public List<PartialUpdateExpression> getList() { return list; } UpdateExpressionList(List<PartialUpdateExpression> l);  UpdateExpressionList(PartialUpdateExpression... l); }
UpdateExpressionList extends UpdateExpression { public List<PartialUpdateExpression> getList() { return list; } UpdateExpressionList(List<PartialUpdateExpression> l);  UpdateExpressionList(PartialUpdateExpression... l); List<PartialUpdateExpression> getList(); @Override JsonNode toJson(); static UpdateExpressionList fromJson(ArrayNode node); }
UpdateExpressionList extends UpdateExpression { public List<PartialUpdateExpression> getList() { return list; } UpdateExpressionList(List<PartialUpdateExpression> l);  UpdateExpressionList(PartialUpdateExpression... l); List<PartialUpdateExpression> getList(); @Override JsonNode toJson(); static UpdateExpressionList fromJson(ArrayNode node);  }