SortCriterionImpl implements SortCriterion { @Override public Order getOrder() { return order; } SortCriterionImpl(String fieldName, Order order); static SortCriterionImpl parse(final String sortCriterion); @Override String getFieldName(); @Override Order getOrder(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testGetOrder() { assertEquals(Order.Ascending, orderByNameAsc.getOrder()); assertEquals(Order.Descending, orderByNameDesc.getOrder()); }