#vulnerable code 
                             @Test
	public void writeXml_data_type() {
		TextPropertyMarshallerImpl marshaller = new TextPropertyMarshallerImpl(Value.CAL_ADDRESS);
		TextPropertyImpl prop = new TextPropertyImpl("mailto:johndoe@example.com");

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

		Document expected = xcalProperty(marshaller, "<cal-address>mailto:johndoe@example.com</cal-address>");
		assertXMLEqual(expected, actual);
	} 
                            #location 7 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Test
	public void writeXml_data_type() {
		TextPropertyMarshallerImpl marshaller = new TextPropertyMarshallerImpl(Value.CAL_ADDRESS);
		TextPropertyImpl prop = new TextPropertyImpl("mailto:johndoe@example.com");
		assertWriteXml("<cal-address>mailto:johndoe@example.com</cal-address>", prop, marshaller);
	}