The visible characters are identical, but the non-printable characters are not.
You are comparing expected output containing CRLF (
\r\n) to actual output with just LF (
\n). You can see that in IntelliJ above the right-hand side of both text areas.
Simple solution is to replace the
\n's in your string with
\r\n. Or remove
\r from the other.
It is also worth noting that the parameter ordering is actually
(Object expected, Object actual), so the
outContent should go second since that is the "actual" output.