// Create an if sequence
Sequence seq = new Sequence();
seq.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 1, 1, 0));
far.put(seq);
If ifBlock = new If();
seq.setBlocks(Arrays.asList(new Block[] { ifBlock }));
EqualsConstraint equals = new EqualsConstraint();
equals.setApplyTo("a");
equals.setValue("aaa");
ifBlock.setConstraints(Arrays.asList(new Constraint[] { equals }));
Sequence thenBranch = new Sequence();
thenBranch.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 2, 2, 0));
far.put(thenBranch);
Set setbThen = new Set();
setbThen.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 3, 3, 0));
setbThen.setApplyTo("b");
setbThen.setValue("then");
thenBranch.setBlocks(Arrays.asList(new Block[] { setbThen }));
ifBlock.setThenBranch(thenBranch);
Sequence elseBranch = new Sequence();
elseBranch.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 4, 4, 0));
far.put(elseBranch);
Set setbElse = new Set();
setbElse.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 5, 5, 0));
setbElse.setApplyTo("b");
setbElse.setValue("else");
elseBranch.setBlocks(Arrays.asList(new Block[] { setbElse }));
ifBlock.setElseBranch(elseBranch);
return seq;
}