AssertEquals(String, String) ComparisonFailure when contents are identical
问题 I'm facing the following scenario: I have an app that spits everything out to the STDOUT (simple company test) and I'm trying to JUnit this. My problem is, when I run the application, it returns me in the Console: (copy and pasted from IntelliJ) Id 1234 nao encontrado 123, R$ 441,00 321, R$ -8490,00 255, R$ 884,00 Print: And my test is: assertEquals(outContent.toString().trim(),"Id 1234 nao encontrado\n" + "123, R$ 441,00\n" + "321, R$ -8490,00\n" + "255, R$ 884,00"); I'm getting: junit