<Cannot mock a kotlin sealed object method> I have...
# stackoverflow
u
Cannot mock a kotlin sealed object method I have a sealed class that contains an object with a method I need to mock. I've tried using Powermock for this but the method does not get mocked (any calls in the test just call the original method). Here's an example of the sealed class: sealed class UseCase { operator fun invoke(parameters: P): Flowable { return execute(parameters) } object GetQuestions : UseCase() { override fun execute(params: GetQuestionsParams): Flowable { return...