FLUID-5205: Added unit tests

Slightly refactored the code to address issues fount while writing the unit tests.
- typos
- was passing in the event name instead of the fire function
- had to move the renderOnPreference option down to the sub panel