add tests for depth-based union find