Actually, I need to get a response of an API call, for that I required Context.
As of release 4.0-alpha-3 on July 21, they removed ShadowApplication.getApplicationContext(). Stick with RuntimeEnvironment.application.getApplicationContext() for any tests annotated with @RunWith(RobolectricTestRunner::class).
As an aside, their current guide has an example of getting string resources using:
final Context context = RuntimeEnvironment.application;
(Note that the javadocs for RuntimeEnvironment and ShadowApplication currently reflect the non-alpha 3.x release.)