I want to mock A.notNull(obj) method in my TestB.java class using EasyMock. I am struggling to mock this method since one week.
//A.class
public class A
{
public static void notNull(Object o)
{
notNull(o,"object is null");
}
public static void notNull(Object o, String s)
{
if (o==null)
{
throw new IllegalArgumentException(s);
}
}
}
//B.class
Class<? extends E> obj;
protected final Simple limit()
{
A.notNull(obj); //I want to mock this line in my TestB.java class using EasyMock framework
}
Any help would be appreciated.