migrating to Java 8
adapting tests to work with Java 8