Move AVL test code into the test library