}
public void testMultipleLocalesWithNamespace()
{
ComponentMessagesSourceImpl source = new ComponentMessagesSourceImpl();
source.setClasspathResourceFactory(new ClasspathResourceFactoryImpl(new DefaultClassResolver()));
source.setComponentPropertySource(new NullComponentPropertySource());
source.setComponentResourceResolver(new ComponentResourceResolverImpl());
IComponentSpecification spec = newSpec(MOCK1);
spec.setLocation(_locationFixture);
INamespace namespace = new Namespace(null, null, newLibrarySpec(), null);
IPage page = newPage(spec, source, new Locale("fr"));
page.setNamespace(namespace);
assertEquals("multilocale_fr", source.getMessages(page).getMessage("multilocale"));
page = newPage(spec, source, new Locale("en"));
page.setNamespace(namespace);
assertEquals("multilocale", source.getMessages(page).getMessage("multilocale"));
}