private static Document doc1;     private static Document doc2;     private static Element rootElement;     private static Element rootElement1;     private static Element rootElement2; leadingAndTrailingWhitespace = doc.createElement("leadingAndTrailingWhitespace");         innerWhitespace = doc.createElement("innerWhitespace");
private static Document doc1;
    private static Document doc2;
    private static Element rootElement;
    private static Element rootElement1;
    private static Element rootElement2;
leadingAndTrailingWhitespace = doc.createElement("leadingAndTrailingWhitespace");
        innerWhitespace = doc.createElement("innerWhitespace");

rootElement = doc.createElement("rootElement");
        doc.appendChild(rootElement);
        rootElement.appendChild(leadingWhitespace);
        rootElement.appendChild(trailingWhitespace);
        rootElement.appendChild(leadingAndTrailingWhitespace);
        rootElement.appendChild(innerWhitespace);
        
        doc1 = build.newDocument();
        rootElement1 = doc1.createElement("rootElement");
        doc1.appendChild(rootElement1);
        rootElement1.appendChild(doc1.createElement("leadingWhitespace"));
        rootElement1.appendChild(doc1.createElement("trailingWhitespace"));
        rootElement1.appendChild(doc1.createElement("leadingAndTrailingWhitespace"));
        rootElement1.appendChild(doc1.createElement("innerWhitespace"));
        
        doc2 = build.newDocument();
        rootElement2 = doc2.createElement("rootElement");
        doc2.appendChild(rootElement2);
        rootElement2.appendChild(doc2.createElement("leadingAndTrailingWhitespace"));
        rootElement2.appendChild(doc2.createElement("trailingWhitespace"));
        rootElement2.appendChild(doc2.createElement("leadingWhitespace"));
        rootElement2.appendChild(doc2.createElement("innerWhitespace"));

    @Test
    public void testOrderCompare() {
        XmlSemDiffInterface diff = new XmlSemDiff();
        
        assertTrue(diff.orderCompare(doc.getDocumentElement(), doc1.getDocumentElement(), true));
        assertTrue(diff.orderCompare(doc.getDocumentElement(), doc1.getDocumentElement(), false));
        assertTrue(diff.orderCompare(doc.getDocumentElement(), doc2.getDocumentElement(), true));
        assertFalse(diff.orderCompare(doc.getDocumentElement(), doc2.getDocumentElement(), false));
    }
sputnikus/sop-xml