Add tests on rb trees using finite machine