{
final FormulaDocument doc = new FormulaDocument();
doc.setText("=MESSAGE(\"Test\"; 1 ; 2)");
final FunctionInformation fn = doc.getFunctionForPosition(1);
final ParameterUpdateEvent event = new ParameterUpdateEvent(this, 3, "[Some parameter]", true);
final FunctionParameterEditHelper.EditResult editResult =
FunctionParameterEditHelper.buildFormulaText(event, fn, doc.getText());
assertEquals("=MESSAGE(\"Test\"; 1 ; 2;[Some parameter])", editResult.text);
assertEquals(39, editResult.caretPositionAfterEdit);