title: How to test AjaxEventBehavior("onClick") for Apache Wicket radio button?
body: <p>I'm using apache wicket and I run into trouble regarding testing the AjaxEventBehavior for a Radio button. Actually I want to test the "onClick" event like in my case when I select/click a radio button from a RadioGroup a specif page is rendered. </p>
  
  <p>Code snippet:</p>
  
  <pre><code>RadioGroup&lt;Boolean&gt; selectPageRadioGroup =
          new RadioGroup&lt;Boolean&gt;("selectPageRadioGroup", new Model&lt;Boolean&gt;(Boolean.TRUE));
  selectPageRadioGroup.setDefaultModel(new Model&lt;Boolean&gt;(Boolean.TRUE));
  final Radio&lt;Boolean&gt; radioButton1 =
          new Radio&lt;Boolean&gt;("radioButton1", new Model&lt;Boolean&gt;(Boolean.FALSE));
  radioButton1.add(new AjaxEventBehavior("onclick") {
      @Override
      protected void onEvent(AjaxRequestTarget target) {
          setResponsePage(MyWebPage.class);
      }
  });
  selectPageRadioGroup.add(radioButton1);
  </code></pre>