Update test.java

update sortfunction