#vulnerable code 
                                @Test
    public void testShutdown2() throws SQLException
    {
        Assert.assertSame("StubConnection count not as expected", 0, StubConnection.count.get());

        StubConnection.slowCreate = true;

        HikariConfig config = new HikariConfig();
        config.setMinimumIdle(10);
        config.setMaximumPoolSize(10);
        config.setInitializationFailFast(false);
        config.setConnectionTestQuery("VALUES 1");
        config.setDataSourceClassName("com.zaxxer.hikari.mocks.StubDataSource");

        HikariDataSource ds = new HikariDataSource(config);
        HikariPool pool = TestElf.getPool(ds);

        PoolUtilities.quietlySleep(300);

        Assert.assertTrue("Totals connection count not as expected, ", pool.getTotalConnections() > 0);
        
        ds.shutdown();

        Assert.assertSame("Active connection count not as expected, ", 0, pool.getActiveConnections());
        Assert.assertSame("Idle connection count not as expected, ", 0, pool.getIdleConnections());
        Assert.assertSame("Total connection count not as expected", 0, pool.getTotalConnections());
    } 
                            #location 22 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testShutdown2() throws SQLException
    {
        Assert.assertSame("StubConnection count not as expected", 0, StubConnection.count.get());

        StubConnection.slowCreate = true;

        HikariConfig config = new HikariConfig();
        config.setMinimumIdle(10);
        config.setMaximumPoolSize(10);
        config.setInitializationFailFast(false);
        config.setConnectionTestQuery("VALUES 1");
        config.setDataSourceClassName("com.zaxxer.hikari.mocks.StubDataSource");

        HikariDataSource ds = new HikariDataSource(config);
        HikariPool pool = TestElf.getPool(ds);

        PoolUtilities.quietlySleep(300);

        Assert.assertTrue("Totals connection count not as expected, ", pool.getTotalConnections() > 0);
        
        ds.close();

        Assert.assertSame("Active connection count not as expected, ", 0, pool.getActiveConnections());
        Assert.assertSame("Idle connection count not as expected, ", 0, pool.getIdleConnections());
        Assert.assertSame("Total connection count not as expected", 0, pool.getTotalConnections());
    }