Migrated over testTreeConnectivity from TinkerPop2.

https://github.com/tinkerpop/blueprints/blob/master/blueprints-test/src/main/java/com/tinkerpop/blueprints/GraphTestSuite.java#L637