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