Use this tag for questions about PowerMock, a Java library for creating mock objects for classes and methods.
I have a static method that is mocked using PowerMock to throw an exception. (It deletes files.) Unfortunately, during my @…
java testing powermockI'm having an issue with mockito and powermock, I can mock an abstract class with a final static method with …
java-8 mockito powermock powermockitoI am using Mockito to mock spring beans. It works fine when I mock an interface. In our application, there …
mocking mockito powermock spring-test powermockitoprivate boolean isEmpty(Object[] array) { if (array == null || array.length == 0) return true; for (int i = 0; i < array.length; i++) { …
java unit-testing junit powermock white-boxI have a class with a few static methods.I need to Mock these static methods. I know PowerMock does …
groovy powermock spockI want millis to return specified value. public long myMethod(){ DateTime nowDateTime = new DateTime(DateTimeZone.UTC); long millis = nowDateTime.getMillis(); …
java mockito powermockIs it possible using Mockito and optionally Powermock to mock a superclass S such that any calls to the superclass …
java inheritance mockito superclass powermockI want to mock only one static method in class, all other methods should work like real object. code: public …
java unit-testing mockito powermock stubbing