ManagementContextImpl portalManagementContext = (ManagementContextImpl)portal.getManagementContext();
assertSame(root.getManagementContext(), portalManagementContext.getParent());
assertSame(portal, portalManagementContext.findContainer());
//
SimpleManagementAware rootManagementAware = (SimpleManagementAware)root.getComponentInstance("RootManagementAware");
ManagementContextImpl rootManagementAwareContext = (ManagementContextImpl)rootManagementAware.context;
assertSame(rootManagementContext, rootManagementAwareContext.getParent());
//
SimpleManagementAware portalManagementAware = (SimpleManagementAware)portal.getComponentInstance("PortalManagementAware");
ManagementContextImpl portalManagementAwareContext = (ManagementContextImpl)portalManagementAware.context;
assertSame(portalManagementContext, portalManagementAwareContext.getParent());
}