#vulnerable code 
                                @Test
    public void testFewerColumnsMappedThanAvailable() {
        db().select("select name, score from person where name='FRED'") //
                .getAs(String.class) //
                .test().awaitDone(TIMEOUT_SECONDS, TimeUnit.SECONDS) //
                .assertValues("FRED") //
                .assertComplete();
    } 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testFewerColumnsMappedThanAvailable() {
        try (Database db = db()) {
            db.select("select name, score from person where name='FRED'") //
                    .getAs(String.class) //
                    .test().awaitDone(TIMEOUT_SECONDS, TimeUnit.SECONDS) //
                    .assertValues("FRED") //
                    .assertComplete();
        }
    }