assertTrue(null != getFacesContext().getViewRoot());
assertTrue(RenderKitFactory.HTML_BASIC_RENDER_KIT.equals(
getFacesContext().getViewRoot().getRenderKitId()));
assertTrue(
getFacesContext().getViewRoot().getLocale().equals(Locale.US));
CompareFiles cf = new CompareFiles();
try {
FileOutputStream os = new FileOutputStream(
RESTORE_VIEW_OUTPUT_FILE);
PrintStream ps = new PrintStream(os);
com.sun.faces.util.DebugUtil.printTree(
getFacesContext().getViewRoot(), ps);
List ignoreList = new ArrayList();
for (int i = 0; i < ignore.length; i++) {
ignoreList.add(ignore[i]);
}
boolean status = cf.filesIdentical(RESTORE_VIEW_OUTPUT_FILE,
RESTORE_VIEW_CORRECT_FILE,
ignoreList);
assertTrue(status);
// PENDING (visvan) test case to verify nothing is persisted if the root
// is marked transient for both client tand server case.