[Truffle] - Fixing tests broken by Truffle warn message.

Truffle is showing a warn message when running on JDK8. This is a dirty
hack that checks if the JDK version 8 and if it's then expects the
truffle warn instead of an empty string.