Fix JDK specific test failures