assertEquals(201, cres.getStatus());
}
public void testDispatchScript() throws Exception
{
ContainerResponse cres = launcher.service("GET", "/groovy-test/groovy1/test", "", null, null, null);
assertEquals(200, cres.getStatus());
assertEquals("Hello from groovy to test", cres.getEntity());
// change script source code
script
.setProperty("jcr:data", Thread.currentThread().getContextClassLoader().getResourceAsStream("test2.groovy"));
session.save();
// must be rebounded , not created other one
assertEquals(resourceNumber + 1, binder.getSize());
cres = new ContainerResponse(new DummyContainerResponseWriter());
cres = launcher.service("GET", "/groovy-test/groovy2/test", "", null, null, null);
assertEquals(200, cres.getStatus());
assertEquals("Hello from groovy to >>>>> test", cres.getEntity());
}