### Question:
ContextComponentManager extends DelegateComponentManager { @Override public ComponentManager getComponentManager() { if (this.execution.getContext() == null) { return this.rootComponentManager; } else { return this.userComponentManager; } }  @Override ComponentManager getComponentManager(); @Override void registerComponent(ComponentDescriptor<T> componentDescriptor, T componentInstance); @Override void registerComponent(ComponentDescriptor<T> componentDescriptor); @Override void setComponentEventManager(ComponentEventManager eventManager); @Override void setParent(ComponentManager parentComponentManager);  }### Answer:
@Test public void testCreateDocumentComponentManager() throws Exception { ComponentManagerManager manager = getComponentManager().getInstance(ComponentManagerManager.class); NamespacedComponentManager componentManager = (NamespacedComponentManager) manager.getComponentManager("document:wiki1:space1.space2.document1", true); assertNotNull(componentManager); assertEquals("document:wiki1:space1.space2.document1", componentManager.getNamespace()); assertEquals("space:wiki1:space1.space2", ((NamespacedComponentManager)componentManager.getParent()).getNamespace()); assertEquals("space:wiki1:space1", ((NamespacedComponentManager)componentManager.getParent().getParent()).getNamespace()); assertEquals("wiki:wiki1", ((NamespacedComponentManager)componentManager.getParent().getParent().getParent()).getNamespace()); }