added controller test for sort