//Assert.assertEquals(1, oldCount);
// The code in MYFACES-3659 reset the component after refresh
Assert.assertEquals(0, oldCount);
// Clear the view and synchronize resources
ViewStructureMetadata metadata = processor.retrieveViewStructureMetadata(facesContext, root);
Assert.assertNotNull(metadata);
processor.clearTransientAndNonFaceletComponentsForDynamicView(facesContext, root, metadata);
// the resource added by state checkA=true should not be there
Assert.assertEquals(0, headerFacet.getChildCount());