@Test
public void testCastXmlToString() {

    ScenarioContext ctx = getContext();
    Script.assign("myXml", "<root><foo>bar</foo></root>", ctx);
    Script.assign(AssignType.XML_STRING, "myString", "myXml", ctx, true);
    ScriptValue value = ctx.vars.get("myString");
    assertEquals(ScriptValue.Type.STRING, value.getType());
    assertEquals("<root><foo>bar</foo></root>", value.getValue());
}