Add tests for rotate