NonRegisteringDriver implements Driver { @Override public int getMajorVersion() { return MAJOR_VERSION; } 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 getMajorVersion() { assertThat(driver.getMajorVersion()).isEqualTo(1); }