You could choose to use assertMultiLineEqual(). If it fails, this method will give you a diff message instead of simply telling you that the values are not equal.