mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Violette Roche-Montane
07.48.2014 faf250ab80ac3c0ddad417541df56e1bb77d6dc2
opendj-sdk/opendj-server/src/test/java/org/forgerock/opendj/server/setup/cli/SetupCliTestCase.java
@@ -142,9 +142,9 @@
        PrintStream errStream = null;
        int resultCode = 0;
        try {
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            final ByteArrayOutputStream out = new ByteArrayOutputStream();
            outStream = new PrintStream(out);
            ByteArrayOutputStream err = new ByteArrayOutputStream();
            final ByteArrayOutputStream err = new ByteArrayOutputStream();
            errStream = new PrintStream(err);
            final SetupCli setup = new SetupCli(outStream, errStream);
@@ -154,10 +154,10 @@
                if (expectedErrOutput != null) {
                    assertThat(out.toString("UTF-8")).contains(wrapText(expectedErrOutput, MAX_LINE_WIDTH));
                }
                assertThat(err.size()).isEqualTo(0);
                assertThat(resultCode).isEqualTo(ReturnCode.SUCCESS.get());
            } else {
                assertThat(resultCode).isNotEqualTo(ReturnCode.SUCCESS.get());
                assertThat(out.size()).isEqualTo(0);
                assertThat(err.size()).isGreaterThan(0);
                final String errorMsg = err.toString("UTF-8").replaceAll(Utils.LINE_SEPARATOR, " ");
                final String expectedMsg = expectedErrOutput.toString().replaceAll(Utils.LINE_SEPARATOR, " ");