@Test
public void testCastStringToXml() {

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