assertNotNull(model);
assertEquals(18, model.getDefinitions().size());
}
public void testConfigurators() {
AbstractConfigurationImpl topConfiguration =
(AbstractConfigurationImpl)new TopConfigurationBuilder().build("TOP");
Configurator topConfigurator = topConfiguration.getConfigurator();
assertNotNull(topConfigurator);
assertTrue(topConfiguration == topConfigurator.getConfiguration());
assertNull(topConfigurator.getHook());
Collection<Configurator> topClients = topConfigurator.getClients();
assertEquals(0, topClients.size());
AbstractConfigurationImpl leafConfiguration =
(AbstractConfigurationImpl)new LeafConfigurationBuilder().build(topConfiguration, "LEAF");
assertEquals(1, topClients.size());
Configurator leafConfigurator = leafConfiguration.getConfigurator();
assertNotNull(leafConfigurator);
assertTrue(leafConfiguration == leafConfigurator.getConfiguration());
Configurator hook = leafConfigurator.getHook();
assertNotNull(hook);
assertTrue(hook == topConfigurator);
Collection<Configurator> leafClients = leafConfigurator.getClients();
assertEquals(0, leafClients.size());
Object cidTop = topConfiguration.getId();
assertEquals("TOP", cidTop.toString());
Object cidLeaf = leafConfiguration.getId();
assertEquals("LEAF", cidLeaf.toString());
assertTrue(cidTop.equals(cidTop));
assertTrue(!cidTop.equals(cidLeaf));
assertTrue(!cidTop.equals(this));