Activation leftActivationMock = (Activation) leftActivationControl.getMock();
MockControl rightActivationControl = mocks.createControl(Activation.class);
Activation rightActivationMock = (Activation) rightActivationControl.getMock();
MockControl resolverControl_1 = mocks.createControl(ConflictResolver.class);
final ConflictResolver resolverMock_1 = (ConflictResolver) resolverControl_1.getMock();
MockControl resolverControl_2 = mocks.createControl(ConflictResolver.class);
final ConflictResolver resolverMock_2 = (ConflictResolver) resolverControl_2.getMock();
// Return value needs to be zero for the next resolver to be invoked
resolverControl_1.expectAndReturn(resolverMock_1.compare(leftActivationMock, rightActivationMock), 0);
resolverControl_2.expectAndReturn(resolverMock_2.compare(leftActivationMock, rightActivationMock), 0);
factory.setResolverStrategies(new ArrayList() {{
add(resolverMock_1);
add(resolverMock_2);
}});
mocks.replay();
factory.afterPropertiesSet();
ConflictResolver resolver = (ConflictResolver) factory.getObject();
resolver.compare(leftActivationMock, rightActivationMock);
mocks.verify();
}