07/23/2022, 8:41 AM
Using ReactApplication in Junit4 tests? I'm writing a test for a method that takes a Context as an argument and casts it internally to ReactApplication. I first wanted to handle this with mocks - but if I pass in a mock Context then it can't cast internally to ReactApplication, and I can't pass a mock ReactApplication as it needs to receive a Context as an argument. What is a good method to handle this taking into account that I can't modify the method signature?