I possibly use the wrong terms, feel free to correct.
I have a test method which takes a Runnable:
void expectRollback(Runnable r) { .. }
I can call this method like this:
expectRollback(() -> aList.add(x))
Cool, I understand lambdas! This is awesome. Let's be super clever...
expectRollback(() -> aList.add(x) && bList.add(y))
But what? That doesn't compile: 'void' methods cannot return a value. Doesn't the first call also return a value though? What is the difference between the first and the second call?