@Test
public void testBeans() throws IOException {

    ModuleBasedContextFactory factory = new ModuleBasedContextFactory();
    ModuleDefinitionSet set = factory.loadModules(defs, "base");
    testBeansInContext(set, "base", 1, new String[] {"base"}, new String[] {"child1", "child2", "child1-1"});
    testBeansInContext(set, "child1", 2, new String[] {"base", "child1"}, new String[] {"child2", "child1-1"});
    testBeansInContext(set, "child2", 4, new String[] {"base", "child2"}, new String[] {"child1", "child1-1"});
    testBeansInContext(set, "child1-1", 3, new String[] {"base", "child1", "child1-1"}, new String[] {"child2"});
}