I have a question about external mocking server. My set up is:
- I have an API which I want to test
 - The service internally calls Database , Gateways , payment aggregators whichs have their own URLS
 - I control the Mock URLS which I can call. But if it is internally initiated how can i mock it without changing my code?
 
For example I call service
- I call Controller of paymentservice which I can mock
 - What about my controller call java module which makes a call to gateway
 
I want to mock that gateway not controller. I see all the examples of karate-netty and Proxy . Proxy tracks all the request after host:port but in my case the host will be real host and how proxy will track it ?
Looks like I tried so much but did not get any perfect solution