Refined OpenJDK-dependant test to make it run on Travis.