Add tests for rotate_rules