Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
java.lang.IllegalStateException: stream has already been operated upon or closed #573
Please provide the following information:
Here is a minimal code example (junit-test)
If you comment out LocalDateTime.now() or the mocked List ... no exception occurs
I use openjdk11 and inteliJ as IDE.
Could anybody explain this for me?
It happens because (in Java 8+) interfaces such as
So, to avoid unexpected failures like this, said interfaces should be (and will be) regarded as unmockable.