class 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);
  }

}

class NonRegisteringDriverTest {

  private final TraceService mockTraceService;
  private final TraceService.Span mockTraceSpan;
  private final Driver mockRealDriver;
  private final Connection mockRealConnection;
  private NonRegisteringDriver driver;

  @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);
  }

}