Add the mockery listener
Remove unnecessary close() call
Test coverage