void (final ProcessOutput runResult, final boolean sorted, final String... stdoutLines) { verify(runResult); final String[] lines = new LineTokenizer(runResult.getStdout()).execute(); if (sorted) { Arrays.sort(lines); } Assert.assertEquals(runResult.getStdout(), stdoutLines.length, lines.length); for(int i=0; i<stdoutLines.length; i++) { Assert.assertEquals(stdoutLines [i], compressWhitespace(lines [i])); } }