NonRegisteringDriver implements Driver { @Override public DriverPropertyInfo[] getPropertyInfo(@Nullable String url, @Nullable Properties info) throws SQLException { checkNotNullUrl(url); return DriverManager.getDriver(getRealUrl(url)).getPropertyInfo(getRealUrl(url), info); } 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 getPropertyInfo() throws Exception { DriverPropertyInfo[] driverPropertyInfos = new DriverPropertyInfo[0]; when(mockRealDriver.acceptsURL("jdbc:mockdriver")).thenReturn(true); when(mockRealDriver.getPropertyInfo(eq("jdbc:mockdriver"), any(Properties.class))) .thenReturn(driverPropertyInfos); Properties info = new Properties(); assertThat(driver.getPropertyInfo("jdbc:stackdriver:mockdriver", info)) .isSameAs(driverPropertyInfos); verify(mockRealDriver).getPropertyInfo("jdbc:mockdriver", info); }