### Question:
CollDeleteClause implements DeleteClause<CollDeleteClause<T>> { @Override public long execute() { int rv = 0; for (T match : query.fetch()) { col.remove(match); rv++; } return rv; } CollDeleteClause(QueryEngine qe, Path<T> expr, Collection<? extends T> col);  CollDeleteClause(Path<T> expr, Collection<? extends T> col); @Override long execute(); @Override CollDeleteClause<T> where(Predicate... o); @Override String toString();  }### Answer:
@Test public void execute() { QCat cat = QCat.cat; List<Cat> cats = new ArrayList<Cat>(Arrays.asList(new Cat("Ann"), new Cat("Bob"), new Cat("John"), new Cat("Carl"))); CollDeleteClause<Cat> deleteClause = new CollDeleteClause<Cat>(cat, cats); deleteClause.where(cat.name.eq("Bob")); assertEquals(1, deleteClause.execute()); assertEquals(3, cats.size()); assertEquals("Ann", cats.get(0).getName()); assertEquals("John", cats.get(1).getName()); assertEquals("Carl", cats.get(2).getName()); }