@Test
public void GettingEffectiveView() throws ObjectStoreException {

    PathQuery pq = getPQ("ungroupedOJG");
    TableRowIterator iter = getResults(pq, new Page(2, 3));
    List<String> expected = Arrays.asList(
        "Employee.name", "Employee.department.name", "Employee.department.manager.name",
        "Employee.department.company.name", "Employee.department.manager.title", "Employee.fullTime",
        "Employee.address.address", "Employee.age");
    List<String> orig = pq.getView();
    List<String> rejiggered = ListFunctions.map(iter.getEffectiveView(), new F<Path, String>() {
        public String call(Path p) {
            return p.getNoConstraintsString();
        }
    });
    puts(orig);
    puts(rejiggered);
    // Have the same dimensions.
    assertEquals(orig.size(), rejiggered.size());
    // Have all the same elements.
    assertEquals(new HashSet<String>(orig), new HashSet<String>(rejiggered));
    // And they are in a suitable order.
    assertEquals(expected, rejiggered);
}