#fixed code
                                @Test
    public void test_streaming_changes() throws IOException {
	    HttpResponse httpResponse = ResponseOnFileStub.newInstance(200, "changes/changes_full.json");
	    
	    StreamingChangesResult changes = new StreamingChangesResult(new ObjectMapper(),
                httpResponse);
	    int i = 0;
        for (DocumentChange documentChange : changes) {
            Assert.assertEquals(++i, documentChange.getSequence());
        }
        Assert.assertEquals(5, changes.getLastSeq());
        changes.close();
    }
#vulnerable code 
                                @Test
    public void test_streaming_changes() throws IOException {
	    HttpResponse httpResponse = ResponseOnFileStub.newInstance(200, "changes/changes_full.json");
	    
	    StreamingChangesResult changes = new StreamingChangesResult(new ObjectMapper(),
                httpResponse);
	    int i = 0;
        for (DocumentChange documentChange : changes) {
            Assert.assertEquals(++i, documentChange.getSequence());
        }
        Assert.assertEquals(5, changes.getLastSeq());
    } 
                            #location 10 
                            #vulnerability type RESOURCE_LEAK