added tests for endpoints