Add tests for crud