Fix failing tests in DataflowStream.
It looks like it's a more general problem with switching to Java 8, because the same code works fine with previous versions of Java.