Fix JUnit tests that rely on previous error output