while_cont.setCondition("${VAR}");
jmvars.put("VAR", "");
ValueReplacer vr = new ValueReplacer();
vr.replaceValues(while_cont);
setRunning(while_cont);
controller.addTestElement(new TestSampler("before"));
controller.addTestElement(while_cont);
GenericController simple = new GenericController();
while_cont.addTestElement(simple);
simple.addTestElement(new TestSampler("one"));
simple.addTestElement(new TestSampler("two"));
while_cont.addTestElement(new TestSampler("three"));
while_cont.addTestElement(new TestSampler("four"));
controller.addTestElement(new TestSampler("after"));
controller.initialize();
for (int i = 1; i <= 3; i++) {
assertEquals("Loop: "+i,"before", nextName(controller));
assertEquals("Loop: "+i,"one", nextName(controller));
assertEquals("Loop: "+i,"two", nextName(controller));