when(securityProviderInstance.iterator()).thenReturn(iterator);
when(securityProviderInstance.get()).thenReturn(securityProvider);
}
private void instrumentConsumers() {
final Iterator<Consumer> iterator = new HashSet<Consumer>(Arrays.asList(new JsonConsumer())).iterator();
when(consumers.iterator()).thenReturn(iterator);
}