@Test
public void replaceAccentedChars() throws Exception {

    String source = null;
    StringBuilder buffer = null;
    int replaced = -1;
    source = "hello";
    buffer = new StringBuilder(source);
    replaced = MobileTextUtil.replaceAccentedChars(buffer);
    Assert.assertEquals(0, replaced);
    Assert.assertEquals(source, buffer.toString());
    source = "h\u00E9llo";
    buffer = new StringBuilder(source);
    replaced = MobileTextUtil.replaceAccentedChars(buffer);
    Assert.assertEquals(1, replaced);
    Assert.assertEquals("hello", buffer.toString());
    source = "\u00E8\u00E9\u00EA\u00EB\u00EF\u00F1\u00F2";
    buffer = new StringBuilder(source);
    replaced = MobileTextUtil.replaceAccentedChars(buffer);
    Assert.assertEquals(7, replaced);
    Assert.assertEquals("eeeeino", buffer.toString());
    source = "\u20AC";
    buffer = new StringBuilder(source);
    replaced = MobileTextUtil.replaceAccentedChars(buffer);
    Assert.assertEquals(0, replaced);
    Assert.assertEquals("\u20AC", buffer.toString());
}