[TEST] Added integration test for sorting by multiple fields

Closes #596