Adding tests for the sort routine