public void test_insertBefore() {
assertEquals("1 2 3 \n 4 abc5 6",StringHelper.insertBefore("1 2 3 \n 4 5 6", "5", "abc"));
}
public void test_appendReplacement() {
Pattern p = Pattern.compile("(\\d+)(\\w+)");
Matcher m = p.matcher("jjj123www");
m.find();
StringBuffer sb = new StringBuffer();
m.appendReplacement(sb, "|$2|");
assertEquals("jjj|www|",sb.toString());
}