I have an Android App, which contains multiple java modules, means non-android modules. One module is core module which has no dependency on Android App module. But it takes Application Context at runtime.
I need to create a JUnit test case in this core module, that requires Android Application Context. I can do this by adding dependency of the Android Application module in core module in IntelliJ Idea by going to Project Settings.
But just for a JUnit test, I don't want to place dependency. Is there any way to mock this Application Context?
Please, let me know if anybody needs more clarification.