### Question:
ForEachExpression extends ArrayUpdateExpression { public QueryExpression getQuery() { return query; } ForEachExpression(Path field, QueryExpression query, UpdateExpression update); Path getField(); QueryExpression getQuery(); UpdateExpression getUpdate(); @Override JsonNode toJson(); static ForEachExpression fromJson(ObjectNode node); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testGetQuery() { QueryExpression expResult = new QueryExpression() { @Override public JsonNode toJson() { throw new UnsupportedOperationException("Not supported yet."); } }; ForEachExpression instance = new ForEachExpression(Path.EMPTY, expResult, null); QueryExpression result = instance.getQuery(); assertEquals(expResult, result); }