JsonXsltSender extends XsltSender { @Override public void configure() throws ConfigurationException { if (StringUtils.isNotEmpty(getXpathExpression()) && StringUtils.isEmpty(getNamespaceDefs())) { setNamespaceDefs("j=http: } super.configure(); }  @Override void configure(); @Override MessageOutputStream provideOutputStream(IPipeLineSession session, IForwardTarget next); @IbisDoc({"1", "When <code>true</code>, the xml result of the transformation is converted back to json", "true"}) void setJsonResult(boolean jsonResult); boolean isJsonResult(); @Override @IbisDoc({"2", "Namespace defintions for xpathExpression. Must be in the form of a comma or space separated list of <code>prefix=namespaceuri</code>-definitions", "j=http://www.w3.org/2013/XSL/json"}) void setNamespaceDefs(String namespaceDefs);  }
@Test public void basic() throws Exception { sender.setStyleSheetName("/Xslt3/orgchart.xslt"); sender.configure(); sender.open(); String input=TestFileUtils.getTestFile("/Xslt3/employees.json"); log.debug("inputfile ["+input+"]"); String expectedJson=TestFileUtils.getTestFile("/Xslt3/orgchart.json"); Message message = new Message(input); PipeRunResult prr = sender.sendMessage(message, session, null); String jsonOut=prr.getResult().asString(); assertJsonEqual(null,expectedJson,jsonOut); }