// values:
style1.setProperty(StyleParagraphPropertiesElement.KeepTogether, "auto");
Assert.assertTrue(style2.compareTo(style1) == 0);
// 9. tab stops vs background image
StyleTabStopsElement tabStops = (StyleTabStopsElement) OdfXMLFactory.newOdfElement(dom, StyleTabStopsElement.ELEMENT_NAME);
StyleTabStopElement tabStop1 = (StyleTabStopElement) OdfXMLFactory.newOdfElement(dom, StyleTabStopElement.ELEMENT_NAME);
StyleTabStopElement tabStop2 = (StyleTabStopElement) OdfXMLFactory.newOdfElement(dom, StyleTabStopElement.ELEMENT_NAME);
OdfStylePropertiesBase propElement = style1.getPropertiesElement(OdfStylePropertiesSet.ParagraphProperties);
propElement.appendChild(tabStops);
tabStops.appendChild(tabStop1);
tabStops.appendChild(tabStop2);
StyleBackgroundImageElement img = (StyleBackgroundImageElement) OdfXMLFactory.newOdfElement(dom, StyleBackgroundImageElement.ELEMENT_NAME);
propElement = style2.getPropertiesElement(OdfStylePropertiesSet.ParagraphProperties);
propElement.appendChild(img);
Assert.assertTrue(style2.compareTo(style1) < 0);
// 10. Same tab stops and background image, different position:
// These two styles are considered distinct!
tabStops = (StyleTabStopsElement) OdfXMLFactory.newOdfElement(dom, StyleTabStopsElement.ELEMENT_NAME);
tabStop1 = (StyleTabStopElement) OdfXMLFactory.newOdfElement(dom, StyleTabStopElement.ELEMENT_NAME);
tabStop2 = (StyleTabStopElement) OdfXMLFactory.newOdfElement(dom, StyleTabStopElement.ELEMENT_NAME);
propElement = style2.getPropertiesElement(OdfStylePropertiesSet.ParagraphProperties);
propElement.appendChild(tabStops);
tabStops.appendChild(tabStop1);
tabStops.appendChild(tabStop2);
img = (StyleBackgroundImageElement) OdfXMLFactory.newOdfElement(dom, StyleBackgroundImageElement.ELEMENT_NAME);
propElement = style1.getPropertiesElement(OdfStylePropertiesSet.ParagraphProperties);
propElement.appendChild(img);
Assert.assertTrue(style2.compareTo(style1) < 0);