check( cluster1.<Long>sum("Transaction.id") == 6);
check( cluster1.count() == 3);
check( cluster1.count("Book.id") == 3);
// check( cluster1.<Long>calc("%s + 10", "Transaction.id") > 0);
// check( new Cluster("Transaction >> Book").fields("Transaction.id", new Calc("calc_field", Long.class, "%s + 10", "Transaction.id")).select().list() != null );
check( new Cluster("Transaction >> Book").fields("Transaction.id", new Calc("calc_field", Long.class, "%s + 10", "Transaction.id")).select().list()
.equals(list(list(1l, 11l), list(2l, 12l), list(3l, 13l), list(null, null))) );
check( new Cluster("Transaction >> Book").fields("Transaction.id", "Book.id", "Book.title", new Max("Transaction.id")).select().group("Book.title").list()
.equals(list(list(1l, 1l, "The Dark Tower", 1l), list(2l, 2l, "The Shining", 3l), list(null, 3l, "Vingt mille lieues sous les mers", null))) );
check( new Cluster("Transaction >> Book").fields("Transaction.id", "Book.id", "Book.title", new Max("Transaction.id")).groupCluster("Book.title").select().list()
.equals(list(list(1l, 1l, "The Dark Tower", 1l), list(2l, 2l, "The Shining", 3l), list(null, 3l, "Vingt mille lieues sous les mers", null))) );