public void testResourceTranslator() throws Exception
{
RegistryBuilder builder = new RegistryBuilder();
Resource moduleResource = new ClasspathResource(_resolver,
"/hivemind/test/config/ResourceTranslator.xml");
builder.addModuleDescriptorProvider(new XmlModuleDescriptorProvider(_resolver));
builder.addModuleDescriptorProvider(new XmlModuleDescriptorProvider(_resolver,
moduleResource));
Registry r = builder.constructRegistry(Locale.FRENCH);
List l = r.getConfiguration("hivemind.test.config.ResourceTranslator");
interceptLogging();
assertEquals(4, l.size());
ResourceHolder h = (ResourceHolder) l.get(0);
assertEquals(moduleResource.getRelativeResource("Empty.xml"), h.getResource());
h = (ResourceHolder) l.get(1);
assertEquals(moduleResource.getRelativeResource("Localized_fr.properties"), h.getResource());
h = (ResourceHolder) l.get(2);
assertNull(h.getResource());
h = (ResourceHolder) l.get(3);