Are you able to mock a class defined in Spring and proxied in Spring in the unit test simultaneously? I am constantly receiving duplicate class definition issues, because the spring proxy is using the same class name as easymock generated proxy because both are proxying using CGLib.
Why does it generate the same names? Why can't it generate random names? Is there a setting for this to make it work?
I am using following.
Spring 3.0
EasyMock 3.2
CGLib 2.2.2 (nodep)
References: Easymock3 Spring4.0.0.RELEASE cglib compatibility