I’m using JUnit with Mockito. PowerMock can mock static methods but it doesn’t seem to be possible to use it with Java 1.4, specially since it needs annotations.
Is there any other alternative?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
(Shameless self promotion here)
There is a project PowerMock-Legacy that lets you use PowerMock in Java 1.4. It is a bit verbose, and not all functionality is supported, but may worth a try.