throws Exception {
Injector injector = Guice.createInjector(new PersisterModule(configuration, environment));
environment.jersey().register(new Resource());
environment.healthChecks().register("test-health-check", new SimpleHealthCheck());
final KafkaChannelFactory kafkaChannelFactory = injector.getInstance(KafkaChannelFactory.class);
<BUG>final MetricsConsumerFactory metricsConsumerFactory =

injector.getInstance(MetricsConsumerFactory.class);
final KafkaMetricsConsumerFactory kafkaMetricsConsumerFactory =

injector.getInstance(KafkaMetricsConsumerFactory.class);
for (int i = 0; i < configuration.getMetricConfiguration().getNumThreads(); i++) {</BUG>
final KafkaChannel kafkaChannel =

throws Exception {
Injector injector = Guice.createInjector(new PersisterModule(configuration, environment));
environment.jersey().register(new Resource());
environment.healthChecks().register("test-health-check", new SimpleHealthCheck());
final KafkaChannelFactory kafkaChannelFactory = injector.getInstance(KafkaChannelFactory.class);
final ConsumerFactory<MetricEnvelope[]> metricsConsumerFactory =
injector.getInstance(Key.get(new TypeLiteral<ConsumerFactory<MetricEnvelope[]>>() {
}));
final KafkaMetricsConsumerFactory<MetricEnvelope[]> kafkaMetricsConsumerFactory =
injector.getInstance(Key.get(new TypeLiteral<KafkaMetricsConsumerFactory<MetricEnvelope[]>>(){}));
for (int i = 0; i < configuration.getMetricConfiguration().getNumThreads(); i++) {
final KafkaChannel kafkaChannel =
