Ordering implements Criterion, WithProperty { public static Ordering asc(String propertyName) { return new Ordering(propertyName, Order.ASCENDING); } Ordering(String propertyName, Order order); static Ordering asc(String propertyName); static Ordering desc(String propertyName); @Override String getPropertyName(); Order getOrder(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void asc() { Ordering o = Ordering.asc(propertyName); assertEquals(propertyName, o.getPropertyName()); assertEquals(Order.ASCENDING, o.getOrder()); }