wrote unit tests for endpoint registration