### Question:
AjaxPageScrollEventBehavior extends AjaxScrollEventBehaviorBase { @Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); attributes.getAjaxCallListeners().add(new PageScrollListener()); }  @Override void renderHead(Component component, IHeaderResponse response);  }### Answer:
@Test(groups = {"wicketTests"}) public void updateAjaxAttributes(){ AjaxPageScrollEventBehavior behavior=new AjaxPageScrollEventBehavior(){ @Override protected void onScroll(AjaxRequestTarget target) { } }; AjaxRequestAttributes attributes=new AjaxRequestAttributes(); behavior.updateAjaxAttributes(attributes); boolean isAdded=false; for(IAjaxCallListener listener:attributes.getAjaxCallListeners()) { if(listener instanceof AjaxPageScrollEventBehavior.PageScrollListener){ isAdded=true; } } Assert.assertTrue(isAdded); }