Update to allow JDK upgrades and add tests