avoiding NFE when messageParameters is empty
adding unit test case
Merge pull request #505 from caelum/issue503

avoiding NFE when messageParameters is empty. Closes #503