Test case for sort view done
Refactored functions to different java modules in test