B b = new B();
b.setB1("b1");
b.setB2("b2");
a.setB(b);
C c1 = new C();
c1.setId("first");
c1.setName("First Element");
C c2 = new C();
c2.setId("second");
c2.setName("Second Element");
C c3 = new C();
c3.setId("third");
c3.setName("Third Element");
Collection collection = new ArrayList();
collection.add(c1);
collection.add(c2);