What\'s the best way to mock a server for testing when using the square retrofit framework.
Potential ways:
Create a new retrofit client and set it
Mockery (disclaimer: I’m the author) was designed just for this exactly task.
Mockery is a mocking/testing library focused on validating networking layers with built-in support for Retrofit. It auto-generates JUnit tests based on the specs of a given Api. The idea is not to have to write manually any test; neither implementing interfaces for mocking server responses.