PseudoLocalization { public String expand(String string) { int expandedStringLength = (int) Math.ceil(string.length() * EXPANSION_FACTOR / 100.0); StringBuilder sb = new StringBuilder(); for (int i = 0; i < expandedStringLength; i++) { if (i == (expandedStringLength - 1)) { sb.append(" "); } else { sb.append(BEGINNING_CHAR); } } sb.append(string); for (int i = 0; i < expandedStringLength; i++) { if (i == 0) { sb.append(" "); } else { sb.append(ENDING_CHAR); } } return sb.toString(); }  String convertStringToPseudoLoc(String string, Set<TextUnitIntegrityChecker> checkers); String convertStringToPseudoLoc(String string); String expand(String string); String convertAsciiToDiacritics(String string);  }
@Test public void testExpandExpandsString() { PseudoLocalization ps = new PseudoLocalization(); String expanded = ps.expand("English Sentence"); assertEquals("The strings should be equal", "萬萬萬萬 English Sentence 國國國國", expanded); }