Add tests for rota editing code