Top "Easymock" questions

Easymock is a mocking framework for Java.

More Matchers recorded than the expected - Easymock fails from Maven and not from Eclipse

I'm having a strange problem with Easymock 3.0 and JUnit 4.8.2. The problem only occurs when executing the tests from Maven and …

java eclipse maven junit easymock
How to cover a method calling a static method using JUnit mocking?

Consider two classes A and B. class A { static int a(){} } class B { void something(){ int value=A.a(); .......}} Now …

java junit static-methods easymock junit3
java.lang.NoSuchMethodError powermock

Guys Question: How to mock a static final class which has defined some other static final class? Problem Description: When …

java junit easymock powermock jmock
Unit testing a java class extending Stored Procedure with EasyMock

When I try to unit test the following class extending StoredProcedure I am getting an NullPointerException at the line: return (…

java easymock java-stored-procedures
Testing code which calls native methods

I have a class like this: public final class Foo { public native int getBar(); public String toString() { return "Bar: " + getBar(); } } …

java junit easymock mockito powermock
java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl cannot be cast to

I am using powermock with powermock-easymock-1.5-full.jar. The following exception occurs. These are the all jars i have in …

unit-testing junit mocking easymock powermock
EasyMock: Add one more expectation after replay

Is it possible to add expectation after having mock object replayed?

java easymock
How do I mock objects that I can't instantiate in my tests?

I'm using EasyMock to mock objects in my tests. But how do I mock objects that are created somewhere else …

java mocking easymock