#vulnerable code 
                             @Test
	public void whenInputIsKeyFileShouldParseFileAndReturnCorrectData() throws FileNotFoundException {
		FileInputStream fileInputStream = new FileInputStream("target/test-classes/DatabaseWithKeyfile.key");
		KeyFile keyFile = new KeyFileXmlParser().fromXml(fileInputStream);

		Assert.assertEquals("RP+rYNZL4lrGtDMBPzOuctlh3NAutSG5KGsT38C+qPQ=", keyFile.getKey().getData());
	} 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                             @Test
	public void whenInputIsKeyFileShouldParseFileAndReturnCorrectData() throws IOException {
		FileInputStream fileInputStream = new FileInputStream("target/test-classes/DatabaseWithKeyfile.key");
		byte[] keyFileContent = StreamUtils.toByteArray(fileInputStream);
		
		KeyFile keyFile = new KeyFileXmlParser().fromXml(keyFileContent);

		Assert.assertEquals("RP+rYNZL4lrGtDMBPzOuctlh3NAutSG5KGsT38C+qPQ=", keyFile.getKey().getData());
	}