JUnit :java.lang.IllegalStateException while executin event.queue() where event is ValueChangeEvent instance
<p>While creating Junit of a method which takes <code>valueChangeEvent</code> object as input, it is throwing an <code>IllegalStateException</code> while calling the queue method.</p>

<p>I have searched a few things which leads me to the conclusion that this is occurring because of 
<code>java.lang.IllegalStateException</code> - if the source component for this event is not a descendant of a <code>UIViewRoot</code>.</p>

<p>How can I make <code>valueChangeEvent</code> component  a  descendant of a <code>UIViewRoot</code>?</p>