The issue may occur when trying to mock a final class. Which class is actually the culprit may become clear only when you limit your test suite to a single test method in a single test class.