UIComponent child2 = new HtmlPanelGroup();
uidata.getChildren().add(child2);
VisitCallback callback = null;
IMocksControl control = EasyMock.createControl();
VisitContext visitContextMock = control.createMock(VisitContext.class);
EasyMock.expect(visitContextMock.getFacesContext()).andReturn(facesContext).anyTimes();
EasyMock.expect(visitContextMock.getHints()).andReturn(Collections.<VisitHint>emptySet()).anyTimes();
Collection<String> subtreeIdsToVisit = new ArrayList<String>();
subtreeIdsToVisit.add("1");
EasyMock.expect(visitContextMock.getSubtreeIdsToVisit(uidata)).andReturn(subtreeIdsToVisit);
EasyMock.expect(visitContextMock.invokeVisitCallback(uidata, callback)).andReturn(VisitResult.ACCEPT);
EasyMock.expect(visitContextMock.invokeVisitCallback(headerFacet, callback)).andReturn(VisitResult.ACCEPT);
EasyMock.expect(visitContextMock.invokeVisitCallback(footerFacet, callback)).andReturn(VisitResult.ACCEPT);
EasyMock.expect(visitContextMock.invokeVisitCallback(facetOfChild1, callback)).andReturn(VisitResult.ACCEPT);
EasyMock.expect(visitContextMock.invokeVisitCallback(child1, callback)).andReturn(VisitResult.ACCEPT);
EasyMock.expect(visitContextMock.invokeVisitCallback(childOfChild1, callback)).andReturn(VisitResult.ACCEPT).times(2);
control.replay();
uidata.visitTree(visitContextMock, callback);
control.verify();