Make tests pass for JDK 8.