InternalDriver implements Driver { @Override public Metrics metrics() { return metricsProvider.metrics(); } InternalDriver( SecurityPlan securityPlan, SessionFactory sessionFactory, MetricsProvider metricsProvider, Logging logging ); @Override Session session(); @Override Session session( SessionConfig sessionConfig ); @Override RxSession rxSession(); @Override RxSession rxSession( SessionConfig sessionConfig ); @Override AsyncSession asyncSession(); @Override AsyncSession asyncSession( SessionConfig sessionConfig ); @Override Metrics metrics(); @Override boolean isMetricsEnabled(); @Override boolean isEncrypted(); @Override void close(); @Override CompletionStage<Void> closeAsync(); @Override final TypeSystem defaultTypeSystem(); @Override CompletionStage<Void> verifyConnectivityAsync(); @Override boolean supportsMultiDb(); @Override CompletionStage<Boolean> supportsMultiDbAsync(); @Override void verifyConnectivity(); SessionFactory getSessionFactory(); NetworkSession newSession( SessionConfig config );  }
@Test void shouldReturnMetricsIfMetricsEnabled() throws Throwable { InternalDriver driver = newDriver( true ); Metrics metrics = driver.metrics(); assertTrue( metrics instanceof InternalMetrics ); }