#vulnerable code 
                                @Test
    public void shouldEstablishTLSConnection() throws Throwable
    {

        Config config = Config.build().withEncryptionLevel( Config.EncryptionLevel.REQUIRED ).toConfig();

        Driver driver = GraphDatabase.driver(
                URI.create( Neo4jRunner.DEFAULT_URL ),
                config );

        StatementResult result = driver.session().run( "RETURN 1" );
        assertEquals( 1, result.next().get( 0 ).asInt() );
        assertFalse( result.hasNext() );

        driver.close();
    } 
                            #location 11 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void shouldEstablishTLSConnection() throws Throwable
    {

        Config config = Config.build().withEncryptionLevel( Config.EncryptionLevel.REQUIRED ).toConfig();

        try( Driver driver = GraphDatabase.driver( URI.create( Neo4jRunner.DEFAULT_URL ), config );
             Session session = driver.session() )
        {
            StatementResult result = session.run( "RETURN 1" );
            assertEquals( 1, result.next().get( 0 ).asInt() );
            assertFalse( result.hasNext() );
        }
    }