This last set of changes left me well positioned to implement the various aspects of the output. Commit [99cb54b] introduced an effective but somewhat awkward test to verify that
System.out was used for normal output. I call it awkward because of the use of the
copiedToOutput variable that needed checking in the override of
retrieve(), shown in Listing 14-7. This amounted to a hand-rolled mock. If I left out the flag, I would have no guarantee that
copyToOutput() was called and therefore that its assertion had been evaluated.
public void testRetrieve_StandardOutput() throws IOException, ...