*
* @throws IOException
*/
public void test_prototypes() throws IOException {
ScriptProcess p = datastore.newProcess(TEST_USER, "prototypes.js", false, "", "owner", TransportType.Dummy);
ScriptAction r = p.call();
assertTrue("Correct result", r instanceof Say);
p.save();
r.visit(new ScriptusFacade(datastore, c, m, conf) {
@Override
public void execute(UUID pid) {
ScriptProcess pp = datastore.getProcess(pid);
ScriptAction rr = pp.call();
assertEquals("final result", NormalTermination.class, rr.getClass());
assertEquals("final result value OK", "foo", ((NormalTermination)rr).getResult());
}
}, p);