Fixed a test to not use a Java 8 method