{
Mock mockEndpoint = MuleTestUtils.getMockOutboundEndpoint();
mockEndpoint.matchAndReturn("getEndpointURI", toMock.getEndpointURI());
mockEndpoint.matchAndReturn("getAddress", toMock.getEndpointURI().getUri().toString());
mockEndpoint.matchAndReturn("toString", toMock.toString());
mockEndpoint.matchAndReturn("getExchangePattern", toMock.getExchangePattern());
mockEndpoint.matchAndReturn("getProperties", toMock.getProperties());
mockEndpoint.matchAndReturn("getFilter", toMock.getFilter());
mockEndpoint.matchAndReturn("getName", toMock.getName());
mockEndpoint.matchAndReturn("getResponseTransformers", toMock.getResponseTransformers());
mockEndpoint.matchAndReturn("hashCode", System.identityHashCode(mockEndpoint));