// Perform a sum and check the results
private void checkSum(AbstractFunction func, String value, String [] addends) throws Exception {
Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
for (int i=0; i< addends.length; i++){
parms.add(new CompoundVariable(addends[i]));
}
parms.add(new CompoundVariable("Result"));
func.setParameters(parms);
assertEquals(value,func.execute(null,null));
assertEquals(value,vars.getObject("Result"));
}