builder.add(null);
SimpleFeature feature = (SimpleFeature) builder.buildFeature("fid.1");
TestConfiguration configuration = new TestConfiguration();
Encoder encoder = new Encoder( configuration );
Document dom = encoder.encodeAsDOM(feature, TEST.TestFeature);
NodeList countList = dom.getElementsByTagName("test:count");
Node count = countList.item(0);
assertEquals("true", count.getAttributes().getNamedItem("xs:nil").getTextContent());
NodeList dateList = dom.getElementsByTagName("test:date");
Node date = dateList.item(0);
assertEquals("true", date.getAttributes().getNamedItem("xs:nil").getTextContent());
// now force the XSD prefix
encoder = new Encoder(configuration);
encoder.getNamespaces().declarePrefix("xsd", "http://www.w3.org/2001/XMLSchema");
dom = encoder.encodeAsDOM(feature, TEST.TestFeature);
countList = dom.getElementsByTagName("test:count");
count = countList.item(0);
assertEquals("true", count.getAttributes().getNamedItem("xsd:nil").getTextContent());
dateList = dom.getElementsByTagName("test:date");
date = dateList.item(0);