### Question:
ASTList extends SimpleNode { @Override public int hashCode() { return Arrays.hashCode(values); } 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 testHashCode() throws Exception { 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)); List<Persistent> collection = new ArrayList<>(); collection.add(artist); ASTList exp2 = new ASTList(collection); ASTList exp3 = new ASTList(Collections.emptyList()); assertEquals(exp.hashCode(), exp2.hashCode()); assertNotEquals(exp.hashCode(), exp3.hashCode()); }