### Question:
OutputCapturer { public PrintStream out() { return out; } OutputCapturer();  OutputCapturer(OutputStream realOut, OutputStream realErr, Charset charset); PrintStream out(); PrintStream err(); void captureTo(OutputListener listener);  }### Answer:
@Test public void passes_through_stdout_to_the_real_stdout() { capturer.out().print("foo"); assertThat("stdout", printedToOut.toString(), is("foo")); assertThat("stderr", printedToErr.toString(), is("")); }