fix for unit tests in java 8