Actually, I need to get a response of an API call, for that I required Context.
Context
First add the following to your build.gradle:
build.gradle
testImplementation 'androidx.test:core:1.2.0'
then use:
ApplicationProvider.getApplicationContext() as Application