SpringockitoContextLoader not compatible with spring 3.2.0-RELEASE
I'm using springockito-annotations that stopped working since spring 3.2.0-RELEASE. In spring 3.1.0-RELEASE there was following method call order initiated from TestContext constructor on contextLoader :
whereas in spring 3.2.0-RELEASE it is :
Now the problem is that modifyLocations methods is passed the Class A where ContextConfiguration locations are defined whereas generateDefaultLocations method is passed the actual Test Class B having fields mocked (considering that our Test class B extends the class A).
As a result there are no mockedBeans found because you don't Map#putAll, but only
this.mockedBeans = mockedBeansFinder.findMockedBeans(clazz);
in both methods....
The easiest fix would be having :