@Test public void dateNamespaceWithValue() { VariableResolverImpl vri = new VariableResolverImpl(); vri.context = new ContextImpl(null,vri, null, Context.FULL_DUMP, Collections.EMPTY_MAP, null,null); vri.addNamespace("dataimporter.functions", EvaluatorBag .getFunctionsNamespace(Collections.EMPTY_LIST, null)); Map<String, Object> ns = new HashMap<String, Object>(); Date d = new Date(); ns.put("dt", d); vri.addNamespace("A", ns); Assert.assertEquals(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d), vri.replaceTokens("${dataimporter.functions.formatDate(A.dt,'yyyy-MM-dd HH:mm:ss')}")); }
public abstract String replaceTokens(String template);
VariableResolver { public abstract String replaceTokens(String template); }
VariableResolver { public abstract String replaceTokens(String template);  }
VariableResolver { public abstract String replaceTokens(String template);  abstract Object resolve(String name); abstract String replaceTokens(String template); }
VariableResolver { public abstract String replaceTokens(String template);  abstract Object resolve(String name); abstract String replaceTokens(String template);  }