CircuitBreakerDataSource extends AbstractUnsupportedOperationDataSource implements AutoCloseable { @Override public Connection getConnection() { return new CircuitBreakerConnection(); }  @Override void close(); @Override Connection getConnection(); @Override Connection getConnection(final String username, final String password); @Override PrintWriter getLogWriter(); @Override void setLogWriter(final PrintWriter out); @Override Logger getParentLogger();  }
@Test public void assertGetConnection() { assertTrue(dataSource.getConnection() instanceof CircuitBreakerConnection); assertTrue(dataSource.getConnection("", "") instanceof CircuitBreakerConnection); }