create Comparator and tests; Comparator gets 2 objects and an attribute name, it compares the objects by their attributes
Query script uses the Comparator to sort the result lists