Translit { public static String toTranslit(String text) { return replaceChars(text, charTable); } private  Translit(); static String toTranslit(String text); static String toWeakerTranslit(String text);  }
@Test public void toTranslitOnCyrillic() throws Exception { String expected = "Ochen' nu oshen' dlinnaya stroka s Raznymi simvolami russkogo alfavita. Y"; String actual = toTranslit("Очень ну ощень длинная строка с Разными символами русского алфавита. Ы"); assertEquals(expected, actual); }
@Test public void toTranslitOnLatin() throws Exception { assertEquals("this one must be left as is", toTranslit("this one must be left as is")); }