final Iterator<ConfiguredObjectRecord> corIterator = asList(queueCor, exchangeCor, virtualHostCor).iterator();
@Override
public Object answer(final InvocationOnMock invocation) throws Throwable
{
ConfiguredObjectRecordHandler handler = (ConfiguredObjectRecordHandler) invocation.getArguments()[0];
boolean handlerContinue = true;
while(corIterator.hasNext() && handlerContinue)
{
handlerContinue = handler.handle(corIterator.next());
}
return null;
}
}).when(_configStore).visitConfiguredObjectRecords(any(ConfiguredObjectRecordHandler.class));