QuickUnion and tests