@Test
public void renderAjaxAttributes()
{
AjaxRequestAttributes attributes = new AjaxRequestAttributes();
AjaxCallListener listener = new AjaxCallListener();
listener.onPrecondition("return somePrecondition();");
listener.onBefore("alert('Before!');");
listener.onAfter("alert('After!');");
listener.onSuccess("alert('Success!');");
listener.onFailure("alert('Failure!');");
listener.onComplete("alert('Complete!');");
attributes.getAjaxCallListeners().add(listener);
Component component = Mockito.mock(Component.class);
AbstractDefaultAjaxBehavior behavior = new AbstractDefaultAjaxBehavior()
{