Add tests for endpoints