Description
Because JSONObject is used in the method org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.renderAjaxAttributes(Component, AjaxRequestAttributes)
which internally uses a HashMap to store the key value pairs - see org.apache.wicket.ajax.json.JSONObject.JSONObject() - it is not ensured the attributes rendered in a specific order. This can cause the unit tests to pass in one run and fail in the next run.
One suggestion would be to switch the HashMap and replace it with at LinkedHashMap to preserve the insertion order.
See stack trace in comment.