public void testResourceTranslator() throws Exception
{
RegistryBuilder builder = new RegistryBuilder();
Resource moduleResource =
new ClasspathResource(_resolver, "/hivemind/test/config/ResourceTranslator.xml");
builder.processModules(_resolver);
builder.processModule(_resolver, moduleResource);
Registry r = (Registry) 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());