public void testSortsElementsByName() throws Exception {
  XppDom dom1=XppFactory.buildDom("<dom><a/></dom>");
  XppDom dom2=XppFactory.buildDom("<dom><b/></dom>");
  assertEquals(-1,comparator.compare(dom1,dom2));
  assertEquals("/dom/a[0]?",xpath.get());
  assertEquals(1,comparator.compare(dom2,dom1));
  assertEquals("/dom/b[0]?",xpath.get());
}

public void testSortsElementsByName ( ) throws Exception { XppDom dom1 = XppFactory . buildDom ( "<dom><a/></dom>" ) ; XppDom dom2 = XppFactory . buildDom ( "<dom><b/></dom>" ) ; assertEquals ( - 1 , comparator . compare ( dom1 , dom2 ) ) ; assertEquals ( "/dom/a[0]?" , xpath . get ( ) ) ; assertEquals ( 1 , comparator . compare ( dom2 , dom1 ) ) ; assertEquals ( "/dom/b[0]?" , xpath . get ( ) ) ; }
tests comparison of different elements .
