@Override
protected void renderResponse() throws Exception
{
Object artists = getValue("#{artists.dataModel}");
assert artists instanceof CollectionModel;
CollectionModel collectionModel = (CollectionModel) artists;
// Reorder the list
List<SortCriterion> criteria = new ArrayList<SortCriterion>();
criteria.add(new SortCriterion("artist.name", true));
collectionModel.setSortCriteria(criteria);
// Check for correct ordering
assertArtist(collectionModel, 5, ARTIST5_NAME);
assertArtist(collectionModel, 4, ARTIST6_NAME);
assertArtist(collectionModel, 3, ARTIST1_NAME);