My test stack is:
- TestNG - Bolding this because I see @runWith recommended as the solution when that's JUnit only
- PowerMock's MockStatic
I've got a test class that I've annotated with @PrepareForTest(StaticClass.class)
And then in my test I'm doing a very simple
I'm getting the standard "java.lang.IllegalStateException: no last call on a mock available" issue, but ONLY when running TestNG from ant, not when running from Eclipse. I believe my classpath includes all the necessary .jar files as PowerMock.mockStatic() is being called fine and all jars were added to the same classpath.
Any help is much appreciated.