@Test
void testReplace() {

    String str = "hello ${t1} and ${t2} s";
    Map<String, Object> map = new HashMap<>();
    map.put("t1", "foo");
    map.put("t2", "bar");
    String ret = StringUtils.replace(str, map);
    assertEquals(ret, "hello foo and bar s");
    map = new HashMap<>();
    map.put("t1", "foo");
    map.put("t2", "${dddd}");
    ret = StringUtils.replace(str, map);
    assertEquals(ret, "hello foo and ${dddd} s");
    map = new HashMap<>();
    map.put("t1", null);
    map.put("t2", "${dddd}");
    ret = StringUtils.replace(str, map);
    assertEquals(ret, "hello null and ${dddd} s");
    map = new HashMap<>();
    map.put("t1", 33);
    map.put("t2", 42L);
    ret = StringUtils.replace(str, map);
    assertEquals(ret, "hello 33 and 42 s");
}