// TODO: while we're at it, the @DataProvider could be factorized!
public static String buildMessage(final MessageBundle BUNDLE,
final String key,
final JsonNode params, final JsonNode data)
{
final ProcessingMessage message = new ProcessingMessage()
.setMessage(BUNDLE.getMessage(key));
if (params != null) {
String name;
JsonNode value;
for (final JsonNode node: params) {
name = node.textValue();
value = data.get(name);
message.putArgument(name, valueToArgument(value));
}
}
return message.getMessage();
}