fix test failure on JDK8.