### Question:
Order { public String toString() { if (ignoreCase) { return "lower(" + getProperty() + ") " + (ascending ? "asc" : "desc"); } else { return getProperty() + " " + (ascending ? "asc" : "desc"); } } Order();  Order(String property, boolean ascending);  Order(String property); String getProperty(); void setProperty(final String property); boolean isAscending(); void setAscending(boolean ascending); Order ignoreCase(); static Order asc(String property); static Order desc(String property); static String toSortString(final List<Order> orders); static List<Order> parse(final String orderString); String toString(); static final String ORDER_STR; }### Answer:
@Test public void testToString() throws Exception { List<Order> sorts = CollectUtils.newArrayList(); sorts.add(new Order("id", false)); sorts.add(Order.asc("name")); assertEquals(Order.toSortString(sorts), "order by id desc,name"); }