Bugfix for JDK 8 when testing java fx elements