Details
Description
I have a DropDownChoice which has a wantOnSelectionChangedNotifications that returns true, so that the onSelectionChanged is called when the selection changes.
In a unit test a selection is made for the dropdown using: formTester.select("dropDown", 0);
The FormTester sets the selected value for the dropdown as a post parameter in the current request and the calls BaseWicketTester#executeListener to process the request for the onSelectionChanged event.
In BaseWicketTester#executeListener however the the request post parameters previously set are ignored, by creating a new empty request:
MockHttpServletRequest request = new MockHttpServletRequest(application, httpSession, servletContext);
I guess either the current request should be used instead of new-ing one or the post parameters should be copied from the current request instance.