@Before public void setupDefaultConfigData() { sp1 = new SingletonParent(); s1 = new Singleton(); c1 = getChild("c1"); c2 = getChild("c2"); p1 = getParent("p1"); p1.add(c2, c1); p1.set(c1); p1.put(c1); p1.put(c2); p2 = getParent("p2"); p2.add(c1, c2); p2.set(c2); p2.put(c1); p2.put(c2); g1 = getGrandfather("g1"); g1.add(p1, p2); g2 = getGrandfather("g2"); g2.add(p1, p2); g2.put(p1); config.registerObserver(observer); config.register(Person.class, Grandfather.class, Parent.class, Child.class, Singleton.class, SingletonParent.class, JSR303Validation.class); if (defaultBeans == null) { // toBeans steals quite a bit of performance when having larger hierarchies. defaultBeans = ImmutableList.copyOf(toBeans(c1, c2, p1, p2, g1, g2)); } }