Small refactorings in Endpoint specs