_broker = mock(Broker.class);
when(_broker.getTaskExecutor()).thenReturn(_taskExecutor);
when(_broker.getModel()).thenReturn(model);
when(_broker.getId()).thenReturn(UUID.randomUUID());
when(_broker.getSecurityManager()).thenReturn(new SecurityManager(_broker, false));
when(_broker.getCategoryClass()).thenReturn(Broker.class);
when(_broker.getEventLogger()).thenReturn(new EventLogger());
AuthenticationProvider<?> provider = mock(AuthenticationProvider.class);
when(provider.getName()).thenReturn(AUTHENTICATION_PROVIDER_NAME);
when(provider.getParent(Broker.class)).thenReturn(_broker);