@Test
public void testReplaceWithArrayExpand() {

    List<Object> list = new LinkedList<>();
    Map<String, Object> map = new HashMap<>();
p.put("externalId", "[{\"taskRefName\":\"t001\",\"workflowId\":\"w002\"}]");
p.put("name", "conductor");
p.put("version", 2);
st.add(map);
    jsonUtils.expand(list);
    Map<String, Object> input = new HashMap<>();
put.put("k1", "${$..externalId}");
put.put("k2", "${$[0].externalId[0].taskRefName}");
put.put("k3", "${__json_externalId.taskRefName}");
put.put("k4", "${$[0].name}");
put.put("k5", "${$[0].version}");
p<String, Object> replaced = parametersUtils.replace(input, list);
sertNotNull(replaced);
sertEquals(replaced.get("k2"), "t001");
sertNull(replaced.get("k3"));
sertEquals(replaced.get("k4"), "conductor");
sertEquals(replaced.get("k5"), 2);
}