ModuleRegistry { public String getModuleForResource(String resource) { String property = environment.getProperty(resource + ".module"); if (property != null) { return property; } String module = resourceToModuleMap.get(resource); if (module == null) { loadResources(); module = resourceToModuleMap.get(resource); } if(module == null) { log.warn("Could not find module for " + resource); } return module; }  RestUri getBaseUriForResource(String resource); RestUri getSearchUriForResource(String resource); RestUri getBaseUriForModule(String module); boolean isModuleRegistered(String module); void loadResources(); String getModuleForResource(String resource); static final String MODULE_POST_FIX; }
@Test public void testGetModuleForResource() throws Exception { String module = moduleRegistry.getModuleForResource("users"); assertEquals("module", ENVIRONMENT_MODULE, module); }