public void testWrite() {
    StringReader reader = new StringReader(xpdl);

    Xmappr xmappr = new Xmappr(XPDLTaskScript.class);
    XPDLTaskScript task = (XPDLTaskScript) xmappr.fromXML(reader);

    JSONObject importObject = new JSONObject();
    task.write(importObject);

    assertEquals(jsonWrite, importObject.toString());
  }
  public void testWrite() {
    StringReader reader = new StringReader(xpdl);

    Xmappr xmappr = new Xmappr(XPDLTriggerResultLink.class);
    XPDLTriggerResultLink trigger = (XPDLTriggerResultLink) xmappr.fromXML(reader);

    JSONObject importObject = new JSONObject();
    trigger.write(importObject);

    assertEquals(jsonWrite, importObject.toString());
  }
  public void testParse() throws JSONException {
    XPDLTaskScript task = new XPDLTaskScript();

    StringWriter writer = new StringWriter();

    Xmappr xmappr = new Xmappr(XPDLTaskScript.class);
    xmappr.setPrettyPrint(false);
    xmappr.toXML(task, writer);

    assertEquals(xpdl, writer.toString());
  }
  public void testParse() throws JSONException {
    XPDLTriggerResultLink trigger = new XPDLTriggerResultLink();
    trigger.parse(new JSONObject(jsonParse));

    StringWriter writer = new StringWriter();

    Xmappr xmappr = new Xmappr(XPDLTriggerResultLink.class);
    xmappr.setPrettyPrint(false);
    xmappr.toXML(trigger, writer);

    assertEquals(xpdl, writer.toString());
  }