Added java sorting tests