Added search and sort to test controller