I am using okhttp.MockWebServer to test rest api calls. Is there a way to use it for mocking a websocket call as well?
Essentially, I have a ws client (Client extends WebSocketListener) which calls an external websocket server and gets back responses asynchronously. I want to mock this server so it can be used for junit test.
Any ideas?
Thanks