@Before
  public void setupStreams() {
    System.setOut(new PrintStream(out));
    System.setErr(new PrintStream(err));
  }
Set up the streams before each test.
ambari-server/src/test/java/org/apache/ambari/server/credentialapi/CredentialUtilTest.java