public void test() throws IOException, SAXException {
Smooks smooks = new Smooks(getClass().getResourceAsStream("smooks-extended-config-12.xml"));
try {
StringResult result = new StringResult();
smooks.filterSource(new StreamSource(getClass().getResourceAsStream("input-message-01.csv")), result);
assertEquals("<csv-set>\n" +
"\t<csv-record number=\"1\">\n" +
"\t\t<firstname>Tom</firstname>\n" +
"\t\t<lastname>Fennelly</lastname>\n" +
"\t\t<gender>Male</gender>\n" +
"\t\t<age>4</age>\n" +
"\t\t<country>Ireland</country>\n" +
"\t</csv-record>\n" +
"\t<csv-record number=\"2\">\n" +
"\t\t<firstname>Mike</firstname>\n" +
"\t\t<lastname>Fennelly</lastname>\n" +
"\t\t<gender>Male</gender>\n" +
"\t\t<age>2</age>\n" +
"\t\t<country>Ireland</country>\n" +
"\t</csv-record>\n" +
"</csv-set>", result.getResult());
} finally {
smooks.close();
}
}