Mocking a series of objects being sent through stdout