if (!expected.equals(result)) {
if (!expected.trim().equals(result.trim())) {
    private void validateLine(int line, String expected, String result) {        if (!expected.equals(result)) {            fail("on line: " + line + ", expected: '" + expected +                 "', found: '" + result + "'");        }    }