assertEquals("bar:123", output);
}
public void testGetComplexBarAsString() {
// children foo->foo->foo
Foo foo = new Foo();
Foo foo2 = new Foo();
foo.setChild(foo2);
Foo foo3 = new Foo();
foo2.setChild(foo3);
// relatives
Foo fooA = new Foo();
foo.setRelatives(new Foo[]{fooA});
Foo fooB = new Foo();
foo2.setRelatives(new Foo[]{fooB});
Foo fooC = new Foo();
foo3.setRelatives(new Foo[]{fooC});
// the bar
Bar bar = new Bar();
bar.setTitle("bar");
bar.setSomethingElse(123);
// now place the bar all over
foo.setBar(bar);
foo2.setBar(bar);
foo3.setBar(bar);
fooA.setBar(bar);
fooB.setBar(bar);
fooC.setBar(bar);
OgnlValueStack vs = createValueStack();
vs.push(foo);
vs.getContext().put("foo", foo);