### Question:
SecureComponentHelper { public static String containerAlias(MarkupContainer container) { if (container == null) throw new SecurityException("specified markupcontainer is null"); MarkupContainer parent = container; PrependingStringBuffer buffer = new PrependingStringBuffer(150); while (parent != null) { if (buffer.length() > 0) buffer.prepend(PATH_SEPARATOR); buffer.prepend(parent.getClass().getName()); parent = parent.getParent(); } return buffer.toString(); }  static ISecurityCheck getSecurityCheck(Component component); static Component setSecurityCheck(Component component, ISecurityCheck securityCheck); static boolean hasSecureModel(Component component); static boolean isActionAuthorized(Component component, String action); static boolean isActionAuthorized(Component component, WaspAction action); static boolean isAuthenticated(Component component); static String alias(Component component); static String alias(Class<?> class1); static String containerAlias(MarkupContainer container); static String[] containerAliasses(Component component); static final String PATH_SEPARATOR; }### Answer:
@Test public void testContainerAlias() { TestPage page = new TestPage(); String path = SecureComponentHelper.containerAlias(page); assertEquals(TestPage.class.getName(), path); path = SecureComponentHelper.containerAlias((MarkupContainer)page.get("txt1")); assertEquals(TestPage.class.getName() + SecureComponentHelper.PATH_SEPARATOR + SecureTextField.class.getName(), path); path = SecureComponentHelper.containerAlias((MarkupContainer)page.get("lvl2")); assertEquals(TestPage.class.getName() + SecureComponentHelper.PATH_SEPARATOR + TestPanel.class.getName(), path); path = SecureComponentHelper.containerAlias((MarkupContainer)page.get("lvl2:txt2")); assertEquals(TestPage.class.getName() + SecureComponentHelper.PATH_SEPARATOR + TestPanel.class.getName() + SecureComponentHelper.PATH_SEPARATOR + SecureTextField.class.getName(), path); path = SecureComponentHelper.containerAlias((MarkupContainer)page.get("lvl2:lvl3")); assertEquals(TestPage.class.getName() + SecureComponentHelper.PATH_SEPARATOR + TestPanel.class.getName() + SecureComponentHelper.PATH_SEPARATOR + WebMarkupContainer.class.getName(), path); path = SecureComponentHelper.containerAlias((MarkupContainer)page.get("lvl2:lvl3:txt3")); assertEquals(TestPage.class.getName() + SecureComponentHelper.PATH_SEPARATOR + TestPanel.class.getName() + SecureComponentHelper.PATH_SEPARATOR + WebMarkupContainer.class.getName() + SecureComponentHelper.PATH_SEPARATOR + SecureTextField.class.getName(), path); }