#fixed code
                             @Test
	public void writeXml_data() {
		Attachment prop = new Attachment("image/png", "data".getBytes());
		assertWriteXml("<binary>" + Base64.encodeBase64String("data".getBytes()) + "</binary>", prop, marshaller);
	}
#vulnerable code 
                             @Test
	public void writeXml_data() {
		Attachment prop = new Attachment("image/png", "data".getBytes());

		Document actual = xcalProperty(marshaller);
		marshaller.writeXml(prop, XmlUtils.getRootElement(actual));

		Document expected = xcalProperty(marshaller, "<binary>" + Base64.encodeBase64String("data".getBytes()) + "</binary>");
		assertXMLEqual(expected, actual);
	} 
                            #location 6 
                            #vulnerability type NULL_DEREFERENCE