I have a class annotated as follows :
@Singleton
public class Foo{
//...
private Too too;
public Too getToo(){
}
}
And this class is an attribute in an abstract class which has the visibility protected.
public abstract class AbstractUsingFoo {
@Inject
protected Foo foo;
public methodToTestPolymorphism();
}
Then there are the subclasses.
How can I have a single instance for Foo class using EasyMock?
I have no problem to combine with Spring4Junit.
Thank you a lot!