public final void testProcessSort() {
SortEvent event = new SortEvent(table, "col1", 0, 0);
listener.processSort(event);
SortOrder sortOrder = table.getSortOrder();
assertNotNull(sortOrder);
SortField[] fields = sortOrder.getFields();
assertNotNull(fields);
assertEquals(1, fields.length);
SortField field = fields[0];
assertEquals("col1", field.getName());
assertEquals(Boolean.TRUE, field.getAscending());
listener.processSort(event);
sortOrder = table.getSortOrder();
assertNotNull(sortOrder);
fields = sortOrder.getFields();
assertNotNull(fields);
assertEquals(1, fields.length);
field = fields[0];
assertEquals("col1", field.getName());
assertEquals(Boolean.FALSE, field.getAscending());
event = new SortEvent(table, "col2", 0, 0);
listener.processSort(event);
sortOrder = table.getSortOrder();
assertNotNull(sortOrder);
fields = sortOrder.getFields();
assertNotNull(fields);
assertEquals(1, fields.length);
field = fields[0];