### Question:
Neo4jDriverMetrics implements MeterBinder { @Override public void bindTo(MeterRegistry meterRegistry) { Metrics metrics = driver.metrics(); metrics.connectionPoolMetrics().forEach(this.getPoolMetricsBinder(meterRegistry)); } Neo4jDriverMetrics(String name, Driver driver, Iterable<Tag> tags); @Override void bindTo(MeterRegistry meterRegistry); static final String PREFIX; }### Answer:
@Test void shouldRegisterCorrectMeters() { SimpleMeterRegistry registry = new SimpleMeterRegistry(); Neo4jDriverMetrics metrics = new Neo4jDriverMetrics("driver", mockDriverWithMetrics(), Collections.emptyList()); metrics.bindTo(registry); assertThat(registry.get(PREFIX + ".acquired").functionCounter()).isNotNull(); assertThat(registry.get(PREFIX + ".closed").functionCounter()).isNotNull(); assertThat(registry.get(PREFIX + ".created").functionCounter()).isNotNull(); assertThat(registry.get(PREFIX + ".failedToCreate").functionCounter()).isNotNull(); assertThat(registry.get(PREFIX + ".idle").gauge()).isNotNull(); assertThat(registry.get(PREFIX + ".inUse").gauge()).isNotNull(); assertThat(registry.get(PREFIX + ".timedOutToAcquire").functionCounter()).isNotNull(); }