}
// cheap way to ensure that we have the same contents.
// if needed an orderBy clause can be added to make this more robust.
Object[] jpqlTuple;
Tuple criteriaTuple;
OrderProducer constructTuple;
for (int i = 0; i < jpqlResults.size(); i++) {
jpqlTuple = jpqlResults.get(i);
criteriaTuple = criteriaResults.get(i);
constructTuple = constructResults.get(i);
assertEquals(jpqlTuple[0], criteriaTuple.get(0));
assertEquals(jpqlTuple[1], criteriaTuple.get(1));
assertEquals(jpqlTuple[0], constructTuple.getOrder());
assertEquals(jpqlTuple[1], constructTuple.getProducer());
}
em.close();
}