Github user mxm commented on the pull request:
https://github.com/apache/flink/pull/1073#issuecomment-136758616
@HuangWHWHW Stephan is talking about something like this instead of the
PrintStreamMock:
```java
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream captureStream = new PrintStream(baos);
PrintStream original = System.out;
System.setOut(captureStream);
System.out.println("Printing one line");
System.out.println("Another line");
System.setOut(original);
captureStream.close();
Assert.equals("Printing one line\nAnotherline\n", baos.toString());
```
You can see that we're using a `PrintStream` with a `ByteArrayOutputStream`
here to capture the contents that are being printed to standard out.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---