[WIP] Add avl tests

This pull request adds and fixes the avl tests