expected = expected.replaceAll(" +", " "); actual = actual.replaceAll(" +", " "); assertEquals(expected, actual);
String expectedLines[] = StringUtils.split(expected.replaceAll(" +", " "), "\n"); String actualLines[] = StringUtils.split(actual.replaceAll(" +", " "), "\n");
    public void testGenerateTypicalProfile() throws Exception {        ClearonePhone phone = new ClearonePhone(new ClearoneModel());        // call this to inject dummy data        PhoneTestDriver.supplyTestData(phone);        StringWriter actualWriter = new StringWriter();        phone.generateProfile(actualWriter);        InputStream expectedProfile = getClass().getResourceAsStream("C1MAXIP.txt");        assertNotNull(expectedProfile);        String expected = IOUtils.toString(expectedProfile);        expectedProfile.close();        String actual = actualWriter.toString();                expected = expected.replaceAll(" +", " ");        actual = actual.replaceAll(" +", " ");        assertEquals(expected, actual);    }