Basic test of UnionFind constructor