private List<ClauseModel> copyClauses() {
   List<ClauseModel> copy = new ArrayList<>(clauses.size());
   for (ClauseModel clause : clauses) {
     copy.add(clause.copy());
   }
   return copy;
 }
 private void assertIterator(Iterator<ClauseModel> itr, String... expectedOrder) {
   for (String expected : expectedOrder) {
     assertTrue(itr.hasNext());
     ClauseModel ci = itr.next();
     String predicateSyntax = createStructureSyntax(expected);
     assertEquals(predicateSyntax, ci.getOriginal().toString());
   }
   assertFalse(itr.hasNext());
 }
 private void assertClauseModel(
     DynamicUserDefinedPredicateFactory dp, int index, ClauseModel original) {
   ClauseModel actual = dp.getClauseModel(index);
   assertNotSame(original, actual);
   assertSame(original.getOriginal(), actual.getOriginal());
 }