Add tests for endpoint option