Get all permutations of inserting a node working with tests.