use Java8 lambda for readable test code.
Java 8 is required.