Add test for lazily adding endpoint