XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(nsContext));
}
@Test
public void testOpenSearchDescriptionDocumentCreation() throws Exception {
OpenSearchDescription document = new OpenSearchDescription(Abdera.getInstance());
document.setShortName(SHORT_NAME);
document.setDescription(DESCRIPTION);
document.setTags(TAG1, TAG2);
Url url = new Url(Abdera.getInstance());
url.setType(URL_TYPE);
url.setTemplate(URL_TEMPLATE);
Query query = new Query(Abdera.getInstance());
query.setRole(Query.Role.EXAMPLE);
query.setSearchTerms(QUERY_TERMS);
document.addUrls(url);
document.addQueries(query);
StringWriter writer = new StringWriter();
document.writeTo(writer);
String result = writer.toString();
System.out.print(result);