StatsdProvider implements Provider<Statsd> { @Override public Statsd get() { final HostAndPort address = configuration.getAddress(); return new Statsd(address.getHost(), address.getPortOrDefault(8125)); } @Inject  StatsdProvider(MetricsStatsdReporterConfiguration configuration); @Override Statsd get();  }
@Test public void get() throws Exception { final StatsdProvider provider = new StatsdProvider(new MetricsStatsdReporterConfiguration()); final Statsd statsd = provider.get(); assertNotNull(statsd); }