### Question:
ASTList extends SimpleNode { @Override public Object getOperand(int index) { if (index == 0) { return values; } throw new ArrayIndexOutOfBoundsException(index); } ASTList(int id);  ASTList();  ASTList(Object[] objects);  ASTList(Collection<?> objects);  ASTList(Iterator<?> objects); @Override Expression shallowCopy(); @Override int getType(); @Override void appendAsString(Appendable out); @Override void appendAsEJBQL(List<Object> parameterAccumulator, Appendable out, String rootId); @Override int getOperandCount(); @Override Object getOperand(int index); @Override void setOperand(int index, Object value); @Override void jjtClose(); @Override int hashCode();  }### Answer:
@Test public void testConstructorWithCollection() { ObjectId objectId = ObjectId.of("Artist", "ARTIST_ID", 1); Persistent artist = mock(Persistent.class); when(artist.getObjectId()).thenReturn(objectId); ASTList exp = new ASTList(Collections.singletonList(artist)); assertNotNull(exp.getOperand(0)); List<Persistent> collection = new ArrayList<>(); collection.add(artist); exp = new ASTList(collection); assertNotNull(exp.getOperand(0)); }