Refactored tests to use the getMockEndpoint() style