@SuppressWarnings("deprecation")
String slaveRoot = story.j.createTmpDir().getPath();
jenkins().addNode(new DumbSlave("slave", "dummy", slaveRoot, "2", Node.Mode.NORMAL, "", story.j.createComputerLauncher(null), RetentionStrategy.NOOP, Collections.<NodeProperty<?>>emptyList()));
p = jenkins().createProject(WorkflowJob.class, "demo");
p.addProperty(new ParametersDefinitionProperty(new StringParameterDefinition("FLAG", null)));
p.setDefinition(new CpsFlowDefinition(
"node('slave') {\n" + // this locks the WS
" sh('echo default=`basename $PWD`')\n" +
" ws {\n" + // and this locks a second one
" sh('echo before=`basename $PWD`')\n" +
" watch(new File('" + jenkins().getRootDir() + "', FLAG))\n" +