Thanks, Mike and Gabriel! It was a pleasure to find these snippets waiting.
Also, Olof suggested that I include something a little less farm-related, so I’ve added another example with Mockito*, too. Thanks, Olof!
*Mockito’s syntax is now even better than this, but this is the syntax I’m used to.