CassandraReporterProvider implements Provider<CassandraReporter> { @Override public CassandraReporter get() { return CassandraReporter.forRegistry(metricRegistry) .prefixedWith(configuration.getPrefix()) .convertDurationsTo(configuration.getUnitDurations()) .convertRatesTo(configuration.getUnitRates()) .filter(new RegexMetricFilter(configuration.getIncludeMetrics())) .build(cassandra); } @Inject  CassandraReporterProvider(MetricsCassandraReporterConfiguration configuration,
                                     Cassandra cassandra,
                                     MetricRegistry metricRegistry); @Override CassandraReporter get();  }
@Test @Ignore("Requires running Cassandra instance") public void get() throws Exception { final MetricsCassandraReporterConfiguration configuration = new MetricsCassandraReporterConfiguration(); final Cassandra influxDbSender = new Cassandra(Collections.singletonList("127.0.0.1"), "keyspace", "table", 60, 9042, "QUORUM"); final CassandraReporterProvider provider = new CassandraReporterProvider(configuration, influxDbSender, new MetricRegistry()); final CassandraReporter reporter = provider.get(); assertNotNull(reporter); }