@Test
public void testReplaceTokens() {

    assertEquals("test", FormatUtils.replaceTokens("test", null, true));
    assertEquals("test", FormatUtils.replaceTokens("test", new HashMap<String, String>(), true));
    Map<String, String> params = new HashMap<String, String>();
    params.put("test", "1");
    assertEquals("test1", FormatUtils.replaceTokens("test$(test)", params, true));
    assertEquals("test0001", FormatUtils.replaceTokens("test$(test|%04d)", params, true));
}