Fix test case.
Don't return parameter  array as reference - may result in inconsistent state.
Update comments
Add a method to notify the container if parameters are changed through reference obtained by toArray.