question: public void testSortsAttributesBeforeElements ( ) throws Exception { XppDom dom1 = XppFactory . buildDom ( "<dom x='a'><a/></dom>" ) ; XppDom dom2 = XppFactory . buildDom ( "<dom x='b'><b/></dom>" ) ; assertEquals ( - 1 , comparator . compare ( dom1 , dom2 ) ) ; assertEquals ( "/dom[@x]" , xpath . get ( ) ) ; assertEquals ( 1 , comparator . compare ( dom2 , dom1 ) ) ; assertEquals ( "/dom[@x]" , xpath . get ( ) ) ; }
target:  Tests comparison sorts attributes before elements.