Junit testing for sort function