#vulnerable code 
                                @Test
    public void test() {
        MultiPartContentProvider multiPartProvider = new MultiPartContentProvider();
        System.out.println(multiPartProvider.getContentType());
        multiPartProvider.addFieldPart("test1", new StringContentProvider("hello multi part1"), null);
        multiPartProvider.addFieldPart("test2", new StringContentProvider("hello multi part2"), null);
        multiPartProvider.close();
        multiPartProvider.setListener(() -> System.out.println("on content"));

        List<ByteBuffer> list = new ArrayList<>();
        for (ByteBuffer buf : multiPartProvider) {
            list.add(buf);
        }
        String value = BufferUtils.toString(list);
        System.out.println(value);
        System.out.println(multiPartProvider.getLength());

        Assert.assertThat(multiPartProvider.getLength(), greaterThan(0L));
    } 
                            #location 14 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void test() {
        MultiPartContentProvider multiPartProvider = new MultiPartContentProvider();
        System.out.println(multiPartProvider.getContentType());
        multiPartProvider.addFieldPart("test1", new StringContentProvider("hello multi part1"), null);
        multiPartProvider.addFieldPart("test2", new StringContentProvider("hello multi part2"), null);
        multiPartProvider.close();
        multiPartProvider.setListener(() -> System.out.println("on content"));

        List<ByteBuffer> list = new ArrayList<>();
        for (ByteBuffer buf : multiPartProvider) {
            list.add(buf);
        }
        String value = $.buffer.toString(list);
        System.out.println(value);
        System.out.println(multiPartProvider.getLength());

        Assert.assertThat(multiPartProvider.getLength(), greaterThan(0L));
    }