added test case, which explains the problem inside getMockEndpoint