MetricsConfig { public Set<Integer> precreateCodes() { return precreateCodes; } @Inject  MetricsConfig(Config config); DurationThresholdConfig durationThresholdConfig(); Set<What> serverMetrics(); Set<Integer> precreateCodes(); int reservoirTtl();  }
@Test public void shouldEnablePrecreatingMetersForStatusCodesIfConfigured() throws Exception { Config config = ConfigFactory.parseString( "metrics.precreate-codes: [300, 403, 404]"); assertThat(Sets.newHashSet(new MetricsConfig(config).precreateCodes()), is(Sets.newHashSet(300, 403, 404))); }