Fixed non-portable test, failing in Java 8