consumersDoneLatch = new ExitNotifier(config.getMaximumStates());
when(consumerFactory.get()).thenReturn(new CrawlTaskConsumer(candidateActions,
consumersDoneLatch, crawler));
crawlSessionProvider = new CrawlSessionProvider(graph, config, new MetricRegistry());
Plugins plugins = new Plugins(config, new MetricRegistry());
controller = new CrawlController(executor, consumerFactory, config, consumersDoneLatch,
crawlSessionProvider, plugins);