/** Check that the exit value, stdout and stderr are as expected. */
private void assertLintOutput(int actualExit, int expectedExit, List<String> expectedStdout,
List<String> expectedStderr) {
Joiner nl = Joiner.on(NEWLINE);
assertThat(stdio.getStdout(), is(nl.join(maybeAddTrailer(expectedStdout))));
assertThat(stdio.getStderr(), is(nl.join(maybeAddTrailer(expectedStderr))));
// Do this last so that we see stdout/stderr errors first.
assertThat(actualExit, is(expectedExit));
}
private void assertStdoutContains(String expected) {