Created test for sort and where