public void testGlobalNamespaces() throws Exception { NamespaceManager manager = (NamespaceManager) muleContext.getRegistry().lookupObject(NamespaceManager.class); assertNotNull(manager); assertTrue(manager.isIncludeConfigNamespaces()); assertEquals(4, manager.getNamespaces().size()); }
public void initialise() throws InitialisationException { try { namespaceManager = muleContext.getRegistry().lookupObject(NamespaceManager.class); } catch (RegistrationException e) { throw new ExpressionRuntimeException(CoreMessages.failedToLoad("NamespaceManager"), e); } if (namespaceManager != null) { if (namespaces == null) { namespaces = new HashMap(namespaceManager.getNamespaces()); } else { namespaces.putAll(namespaceManager.getNamespaces()); } } }