refactor tests for binary search tree