fix a minor bug in the unit test for JDK 8, and delete some useless classes