public void testFaceletsTag() throws Exception {
FaceletContext ctx = new MockFaceletContext(facesContext);
Map<String, Object> attributes = facesContext.getViewRoot().getAttributes();
Object ajaxBean = new Object();
TagHandler ajaxTag = setupTagHandler("ajaxAliveBean", ajaxBean, true);
ajaxTag.apply(ctx , null);
assertSame(ajaxBean, attributes.get(AjaxPhaseListener.AJAX_BEAN_PREFIX + "ajaxAliveBean"));
Object bean = new Object();
TagHandler tag = setupTagHandler("thatBean", bean, false);
tag.apply(ctx, null);
assertSame(bean, attributes.get(AjaxPhaseListener.VIEW_BEAN_PREFIX + "thatBean"));
}