I'm trying to write some tests for Android for the first time.
I have an app that calls server (via AsyncTask) in OnCreate function to get some settings. But I don't want to call server when running my instrumented tests.
Currently I have achieved this by setting some static variable in @BeforeClass function and then I'm checking this variable in function that calls server.
Is there any other less ugly solution for this?