JUnit test case for function sort added