Static methods are called without creating instance of a class. The fflib_ApexMock library gives option to mock, but how to call static methods when mocking a class. Like in Mockito we have
powerMockito.mockStatic. How can we achieve same in apex mock?
For Eg: this gives NullPointerException:
And if I try to mock the
AStaticClass and used the reference it says cannot call static methods from initialized object. Which is obvious.
Anybody tried to mock static class?