test functions for red black tree