Validating sort functionality in HTML table

Is there a way to validate whether sorting is working in a HTML table?