Test UnionFind (disjoint-set algorithm) from JGraphT [dev.]