// The old way the default attributes were set in PageData.initializeAttributes()
// was to set them with a value of "true"
// The SavePropertiesResponder saves them by setting the attribute without a value.
// This test ensures that the behavior is the same (i.e. without value)
page = WikiPageUtil.addPage(root, PathParser.parse(PAGE_NAME), "");
PageData defaultData = page.getData();
request = new MockRequest();
request.setResource(PAGE_NAME);
setBooleanAttributesOnRequest(defaultData, PageData.NON_SECURITY_ATTRIBUTES);
setBooleanAttributesOnRequest(defaultData, PageData.SECURITY_ATTRIBUTES);
responder.makeResponse(FitNesseUtil.makeTestContext(root), request);
PageData dataToSave = page.getData();
// The LasModified Attribute is the only one that might be different, so fix it here
dataToSave.setAttribute(PropertyLAST_MODIFIED, defaultData.getAttribute(PropertyLAST_MODIFIED));
WikiPageProperties defaultWikiPagePropertiesDefault = new WikiPageProperties(defaultData.getProperties());
WikiPageProperties wikiPagePropertiesToSave = new WikiPageProperties(dataToSave.getProperties());
assertEquals(defaultWikiPagePropertiesDefault.toXml(), wikiPagePropertiesToSave.toXml());
}