public void testNestedParameterReplacement()
{
final ParameterUpdateEvent event = new ParameterUpdateEvent(this, 1, "AND(1; (1 + 1))", true);
final FormulaDocument doc = new FormulaDocument();
doc.setText("=IF(;SUM();)");
final FunctionInformation fn = doc.getFunctionForPosition(9);
assertEquals("SUM", fn.getCanonicalName());
final FunctionParameterEditHelper.EditResult editResult =
FunctionParameterEditHelper.buildFormulaText(event, fn, doc.getText());
assertEquals("=IF(;SUM(;AND(1; (1 + 1)));)", editResult.text);