Update tests to pass in Java 8