### Question:
MetricRegistry { public <T extends Metric> T custom(final String id, final Class<T> klass) { return custom(id, klass, DEFAULT_MAX_CARDINALITY); } MetricRegistry(); Counter counter(final String id); Counter counter(final String id, final int maxCardinality); Gauge gauge(final String id); Gauge gauge(final String id, final int maxCardinality); GaugeDouble gaugeDouble(final String id); GaugeDouble gaugeDouble(final String id, final int maxCardinality); Timer timer(final String id); Timer timer(final String id, final int maxCardinality); T custom(final String id, final Class<T> klass); T custom(final String id, final Class<T> klass, final int maxCardinality); void addReporter(final Reporter reporter);  }### Answer:
@Test public void testNoConstructor() { MetricRegistry metricRegistry = new MetricRegistry(); assertThrows(IllegalStateException.class, () -> metricRegistry.custom("test", TestKlass.class)); }