Fix for tests under java 8