NonRegisteringDriver implements Driver { @Override public Logger getParentLogger() throws SQLFeatureNotSupportedException { throw new SQLFeatureNotSupportedException(); } NonRegisteringDriver(); @VisibleForTesting  NonRegisteringDriver(TraceService traceService); @Override boolean acceptsURL(@Nullable String url); @Override Connection connect(@Nullable String url, @Nullable Properties info); @Override int getMajorVersion(); @Override int getMinorVersion(); @Override DriverPropertyInfo[] getPropertyInfo(@Nullable String url, @Nullable Properties info); @Override Logger getParentLogger(); @Override boolean jdbcCompliant();  }
@Test public void getParentLogger() { try { driver.getParentLogger(); fail("expected SQLFeatureNotSupportedException"); } catch (SQLFeatureNotSupportedException expected) { } }