@Test
public void testOptions() {
Logger.setLogger(new LoggerTextual());
Options options = new Options();
for (int i=0; i < values.length; i++)
options.setOption("option"+(i+1), values[i]);
checkValues(options);
String xml = options.getXML(0);
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = null;
try {
db = dbf.newDocumentBuilder();
} catch (ParserConfigurationException e1) {
fail(e1.getMessage());
}
Document doc = null;
try {
doc = db.parse(new InputSource(new StringReader(xml)));
} catch (SAXException e) {
fail(e.getMessage());
} catch (IOException e) {
fail(e.getMessage());
}
Options options2 = new Options();
options2.loadFromXML(doc.getFirstChild());
checkValues(options2);
options2.printOptions();
}