assertNotNull(resource);
    public void testSerialize4( ) throws Exception{    	System.out.println("Xerces version: "+org.apache.xerces.impl.Version.getVersion( ));    	Document doc = javax.xml.parsers.DocumentBuilderFactory.newInstance( ).newDocumentBuilder().parse(testFile);    	XMLResource resource = (XMLResource) c.createResource(null, "XMLResource");    	resource.setContentAsDOM(doc);    	System.out.println("Storing resource: "+resource.getId( ));    	c.storeResource(resource);    	resource = (XMLResource)c.getResource(resource.getId());    	Node node = resource.getContentAsDOM();    	System.out.println("Attempting serialization using eXist's SAX serializer");    	StringWriter writer = new StringWriter();    	Properties outputProperties = new Properties();    	outputProperties.setProperty("indent", "yes");    	SAXSerializer serializer = new SAXSerializer(writer, outputProperties);    	resource.getContentAsSAX(serializer);    	    	System.out.println("Using org.exist.util.serializer.SAXSerializer");    	System.out.println("---------------------");    	System.out.println(writer.toString());    	System.out.println("---------------------");    }