SortOrder implements Serializable, Cloneable { public static boolean bothOrdersUseTheSameAttributeSet(SortOrder so1, SortOrder so2) { if (so1 == so2) { return true; } if (so1 == null || so2 == null) { return false; } return ObjectUtils.equals(so1.getAttr(), so2.getAttr()) && bothOrdersUseTheSameAttributeSet(so1.getNextSortOrder(), so2.getNextSortOrder()); } SortOrder(final QueryAttr attribute);  SortOrder(final QueryAttr attr, final boolean ascending);  SortOrder(final QueryAttr attr, final boolean ascending, SortOrder nextSortOrder);  SortOrder(final QueryAttr... attrs); boolean isAscending(); QueryAttr getAttr(); SortOrder getReverseSortOrder(); SortOrder getNextSortOrder(); @Override SortOrder clone(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static boolean bothOrdersUseTheSameAttributeSet(SortOrder so1, SortOrder so2);  }
@Test public void testCompareSameAttributeSet() { SortOrder so1 = new SortOrder(qa1, qa2, qa3); SortOrder so2 = new SortOrder(qa1, qa2, qa3); assertEquals(true, SortOrder.bothOrdersUseTheSameAttributeSet(so1, so2)); }
@Test public void testCompareDifferentAttributeSets() { SortOrder so1 = new SortOrder(qa1, qa2, qa3); SortOrder so2 = new SortOrder(qa1, qa2); assertEquals(false, SortOrder.bothOrdersUseTheSameAttributeSet(so1, so2)); }