Most of the code is mocking boilerplate but it shows that the behaviour is as defined in the comments.