Buggy code:
public void startComponent ( Component component ) { } private RuntimeException convertoUnexpect ( Exception e ) { } public Component getComponentFromLastRenderedPage ( String path ) { } public Result hasLabel ( String path , String expectedLabelText ) { } public < C extends Page > Result isPageLink ( String path , Class < C > expectedPageClass ) { } public < C extends Component > Result isComponent ( String path , Class < C > expectedComponentClass ) { } public Result isVisible ( String path ) { } public Result isInvisible ( String path ) { } public Result ifContains ( String pattern ) { } public void assertListView ( String path , List < ? > expectedList ) { } public void clickLink ( String path ) { } public void clickLink ( String path , boolean isAjax ) { Component linkComponent = getComponentFromLastRenderedPage ( path ) ; if ( linkComponent instanceof AjaxLink ) { if ( isAjax == false ) { fail ( ( ( ( "Link<seq2seq4repair_space>" + path ) + "is<seq2seq4repair_space>an<seq2seq4repair_space>AjaxLink<seq2seq4repair_space>and<seq2seq4repair_space>will<seq2seq4repair_space>" ) + "not<seq2seq4repair_space>be<seq2seq4repair_space>invoked<seq2seq4repair_space>when<seq2seq4repair_space>AJAX<seq2seq4repair_space>(javascript)<seq2seq4repair_space>is<seq2seq4repair_space>disabled." ) ) ; } AjaxLink < ? > link = ( ( AjaxLink < ? > ) ( linkComponent ) ) ; setupRequestAndResponse ( true ) ; WebRequestCycle requestCycle = createRequestCycle ( ) ; BaseWicketTester . callOnBeginRequest ( requestCycle ) ; AjaxRequestTarget target = new AjaxRequestTarget ( link . getPage ( ) ) ; requestCycle . setRequestTarget ( target ) ; link . onClick ( target ) ; processRequestCycle ( requestCycle ) ; } else if ( ( linkComponent instanceof AjaxFallbackLink ) && isAjax ) { AjaxFallbackLink < ? > link = ( ( AjaxFallbackLink < ? > ) ( linkComponent ) ) ; setupRequestAndResponse ( true ) ; WebRequestCycle requestCycle = createRequestCycle ( ) ; AjaxRequestTarget target = new AjaxRequestTarget ( link . getPage ( ) ) ; requestCycle . setRequestTarget ( target ) ; link . onClick ( target ) ; processRequestCycle ( requestCycle ) ; } else if ( linkComponent instanceof AjaxSubmitLink ) { if ( isAjax == false ) { fail ( ( ( ( "Link<seq2seq4repair_space>" + path ) + "is<seq2seq4repair_space>an<seq2seq4repair_space>AjaxSubmitLink<seq2seq4repair_space>and<seq2seq4repair_space>" ) + "will<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>invoked<seq2seq4repair_space>when<seq2seq4repair_space>AJAX<seq2seq4repair_space>(javascript)<seq2seq4repair_space>is<seq2seq4repair_space>disabled." ) ) ; } AjaxSubmitLink link = ( ( AjaxSubmitLink ) ( linkComponent ) ) ; List < IBehavior > behaviors = link . getBehaviors ( ) ; AjaxFormSubmitBehavior ajaxFormSubmitBehavior = null ; for ( IBehavior behavior : behaviors ) { if ( behavior instanceof AjaxFormSubmitBehavior ) { AjaxFormSubmitBehavior submitBehavior = ( ( AjaxFormSubmitBehavior ) ( behavior ) ) ; ajaxFormSubmitBehavior = submitBehavior ; } } String failMessage = "No<seq2seq4repair_space>form<seq2seq4repair_space>submit<seq2seq4repair_space>behavior<seq2seq4repair_space>found<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>submit<seq2seq4repair_space>link.<seq2seq4repair_space>Strange!!" ; notNull ( failMessage , ajaxFormSubmitBehavior ) ; WebRequestCycle requestCycle = setupRequestAndResponse ( true ) ; submitAjaxFormSubmitBehavior ( ajaxFormSubmitBehavior ) ; ajaxFormSubmitBehavior . onRequest ( ) ; processRequestCycle ( requestCycle ) ; } else if ( linkComponent instanceof SubmitLink ) { SubmitLink submitLink = ( ( SubmitLink ) ( linkComponent ) ) ; String pageRelativePath = submitLink . getInputName ( ) ; getParametersForNextRequest ( ) . put ( pageRelativePath , new String [ ] { "x" } ) ; Form < ? > form = submitLink . getForm ( ) ; form . visitFormComponents ( new FormComponent . IVisitor ( ) { public Object formComponent ( IFormVisitorParticipant formComponent ) { FormComponent < ? > component = ( ( FormComponent < ? > ) ( formComponent ) ) ; if ( ( getParametersForNextRequest ( ) . containsKey ( component . getInputName ( ) ) ) == false ) { getParametersForNextRequest ( ) . put ( component . getInputName ( ) , new String [ ] { component . getDefaultModelObjectAsString ( ) } ) ; } return IVisitor . CONTINUE_TRAVERSAL ; } } ) ; submitForm ( submitLink . getForm ( ) . getPageRelativePath ( ) ) ; } else if ( linkComponent instanceof AbstractLink ) { AbstractLink link = ( ( AbstractLink ) ( linkComponent ) ) ; if ( link instanceof BookmarkablePageLink ) { BookmarkablePageLink < ? > bookmarkablePageLink = ( ( BookmarkablePageLink < ? > ) ( link ) ) ; try { <START_BUG> Field parametersField = BookmarkablePageLink . class . getDeclaredField ( "parameters" ) ; <END_BUG> Method getParametersMethod = BookmarkablePageLink . class . getDeclaredMethod ( "getPageParameters" , ( ( Class < ? > [ ] ) ( null ) ) ) ; getParametersMethod . setAccessible ( true ) ; PageParameters parameters = ( ( PageParameters ) ( getParametersMethod . invoke ( bookmarkablePageLink , ( ( Object [ ] ) ( null ) ) ) ) ) ; setParametersForNextRequest ( parameters . toRequestParameters ( ) ) ; } catch ( Exception e ) { fail ( ( "Internal<seq2seq4repair_space>error<seq2seq4repair_space>in<seq2seq4repair_space>WicketTester.<seq2seq4repair_space>" + "Please<seq2seq4repair_space>report<seq2seq4repair_space>this<seq2seq4repair_space>in<seq2seq4repair_space>Wickets<seq2seq4repair_space>Issue<seq2seq4repair_space>Tracker." ) ) ; } } executeListener ( link ) ; } else { fail ( ( ( "Link<seq2seq4repair_space>" + path ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>Link,<seq2seq4repair_space>AjaxLink,<seq2seq4repair_space>AjaxFallbackLink<seq2seq4repair_space>or<seq2seq4repair_space>AjaxSubmitLink" ) ) ; } } public void submitForm ( String path ) { } public void setParameterForNextRequest ( String componentPath , Object value ) { } public < C extends Page > Result isRenderedPage ( Class < C > expectedRenderedPageClass ) { } public void assertResultPage ( final Class < ? > pageClass , final String filename ) throws Exception { } public Result isResultPage ( final String expectedDocument ) throws Exception { } public Result hasNoErrorMessage ( ) { } public Result hasNoInfoMessage ( ) { } public List < Serializable > getMessages ( final int level ) { } public void dumpPage ( ) { } public void debugComponentTrees ( ) { } public void debugComponentTrees ( String filter ) { } public Result isComponentOnAjaxResponse ( Component component ) { } public void executeAjaxEvent ( String componentPath , String event ) { } public void executeAjaxEvent ( Component component , String event ) { } protected WebRequestCycle resolveRequestCycle ( ) { } public TagTester getTagByWicketId ( String wicketId ) { } public static List < TagTester > getTagsByWicketId ( WicketTester tester , String wicketId ) { } public TagTester getTagById ( String id ) { } private void submitAjaxFormSubmitBehavior ( AjaxFormSubmitBehavior behavior ) { }

Fix:
BookmarkablePageLink . class . getDeclaredField ( "parameters" ) ;