fix some tests and probably fix build in travis CI caused by the IDE supporting JDK 8 and the target environment (Amazon EMR/Hadoop) not.