Remove sun.misc.Sort dependency (as it is not recommed http://www.infoq.com/news/2013/09/remove-sun.misc.sort-java-8 ) and fix some tests