AlgoBox { public static String add_Left_Char(String sInput, String position) { if (position == null || "".equals(position)) { return sInput; } if (sInput == null) { sInput = ""; } return position + sInput; }  static void main(String[] args); static String pick_Char(String sInput, String pattern); static String first_N_Consonants(String sInput, int nb); static String first_N_Vowels(String sInput, int nb); static String subStr(String sInput, String pattern); static String first_N_Char(String sInput, int nb); static String last_N_Char(String sInput, int nb); static String first_N_Char_EW(String sInput, int nb); static String first_Char_EW(String sInput); static String soundex(String sInput); static String doublemetaphone(String sInput); static String metaphone(String sInput); static String add_Left_Char(String sInput, String position); static String add_Right_Char(String sInput, String position); static String removeDiacriticalMarks(String sInput); static String exact(String sInput); static String useDefault(String sInput, String insteadOf); static String lowerCase(String sInput); static String upperCase(String sInput); static String removeDMAndLowerCase(String sInput); static String removeDMAndUpperCase(String sInput); static String fingerPrintKey(String sInput); static String nGramKey(String sInput); static String colognePhonetic(String sInput);  }
@Test public void testAdd_Left_Char() { assertEquals("<test", AlgoBox.add_Left_Char(TEST_STR, "<")); assertEquals(TEST_STR, AlgoBox.add_Left_Char(TEST_STR, null)); assertEquals(NULL_STR, AlgoBox.add_Left_Char(NULL_STR, BLANK_STR)); assertEquals("\\test", AlgoBox.add_Left_Char(TEST_STR, "\\")); assertEquals(QUO_STR, AlgoBox.add_Left_Char(null, QUO_STR)); assertEquals("<リンゴ", AlgoBox.add_Left_Char(JAPANESE1_STR, "<")); }