private void assertPlaceholder(Node node, String name, String location) {
assertPlaceholder(node, name, location, new String[0], null);
}
private void assertPlaceholder(Node node, String name, String location, String[] params, String paramsString) {
Placeholder placeholder = (Placeholder) node;
assertEquals(name, placeholder.name);
assertEquals(paramsString, placeholder.paramsString);
assertLocation(placeholder.location, location);
if (isEmptyArray(params)) {
assertEquals(0, placeholder.params.length);
} else {
assertEquals(params.length, placeholder.params.length);
for (int i = 0; i < params.length; i++) {
assertEquals(params[i], placeholder.params[i].getValue());
}
}
String str = placeholder.toString();
if (paramsString == null) {
assertThat(str, startsWith("${" + name + "}"));
} else {
assertThat(str, startsWith("${" + name + ":" + paramsString + "}"));