fixed unit test to work on jdk8