Adding a sort test

Adding a sort test that demonstrates a problem seen in production.