Add tests for check_endpoint.
Make check_endpoint a static method.