INT-2884: Refactor 'stdout' tests to use mocks

https://jira.springsource.org/browse/INT-2884