Buggy code:
private MockWebResponse response ; private Session session ; private RequestCycle requestCycle ; private Page lastRenderedPage ; private boolean exposeExceptions = true ; private IRequestHandler forcedHandler ; public Page getLastRenderedPage ( ) { } public BaseWicketTester ( ) { } public < C extends Page > BaseWicketTester ( final Class < C > homePage ) { } public BaseWicketTester ( final WebApplication application ) { } private void setupNextRequestCycle ( ) { } public MockWebRequest getRequest ( ) { } public void setRequest ( MockWebRequest request ) { } public Session getSession ( ) { } public WebApplication getApplication ( ) { } public void destroy ( ) { } public boolean processRequest ( ) { } public void processRequest ( MockWebRequest request ) { } public boolean processRequest ( MockWebRequest request , IRequestHandler forcedRequestHandler ) { } public boolean processRequest ( IRequestHandler forcedRequestHandler ) { } private boolean processRequest ( MockWebRequest forcedRequest , IRequestHandler forcedRequestHandler , boolean redirect ) { } private void recordRequestResponse ( ) { } public Page startPage ( IPageProvider pageProvider ) { } public Page startPage ( Page page ) { } public MockWebResponse getLastResponse ( ) { } public String getLastResponseAsString ( ) { } public List < MockWebRequest > getPreviousRequests ( ) { } public List < MockWebResponse > getPreviousResponses ( ) { } public void setFollowRedirects ( boolean followRedirects ) { } public boolean isFollowRedirects ( ) { } public Url urlFor ( IRequestHandler handler ) { } public final Page startPage ( final ITestPageSource testPageSource ) { } public void executeListener ( Component component , RequestListenerInterface listener ) { } public void executeListener ( Component component ) { } public void executeBehavior ( final AbstractAjaxBehavior behavior ) { } public final < C extends Page > Page startPage ( Class < C > pageClass ) { } public final < C extends Page > Page startPage ( Class < C > pageClass , PageParameters parameters ) { } public FormTester newFormTester ( String path ) { } public FormTester newFormTester ( String path , boolean fillBlankString ) { } public final Panel startPanel ( final TestPanelSource testPanelSource ) { } public final < C extends Panel > Panel startPanel ( final Class < C > panelClass ) { } 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 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 ) { } public void submitForm ( Form form ) { } public void submitForm ( String path ) { } private void transform ( Url url ) { } 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 executeAllTimerBehaviors ( MarkupContainer container ) { } public void executeAjaxEvent ( final Component component , final String event ) { } public TagTester getTagByWicketId ( String wicketId ) { } public List < TagTester > getTagsByWicketId ( String wicketId ) { } public TagTester getTagById ( String id ) { } private void submitAjaxFormSubmitBehavior ( final Component component , AjaxFormSubmitBehavior behavior ) { } public String getContentTypeFromResponseHeader ( ) { <START_BUG> String contentType = getLastResponse ( ) . getHeader ( "Content-Type" ) ; <END_BUG> if ( contentType == null ) { throw new WicketRuntimeException ( "No<seq2seq4repair_space>Content-Type<seq2seq4repair_space>header<seq2seq4repair_space>found" ) ; } return contentType ; } public int getContentLengthFromResponseHeader ( ) { } public String getLastModifiedFromResponseHeader ( ) { } public String getContentDispositionFromResponseHeader ( ) { } private Result isTrue ( String message , boolean condition ) { } private Result isEqual ( Object expected , Object actual ) { } private void notNull ( String message , Object object ) { } private Result isNull ( String message , Object object ) { } private void fail ( String message ) { } public RequestCycle getRequestCycle ( ) { } public MockWebResponse getResponse ( ) { } public MockWebRequest getLastRequest ( ) { } public boolean isExposeExceptions ( ) { } public void setExposeExceptions ( boolean exposeExceptions ) { } private class LastPageRecordingPageRendererProvider implements IPageRendererProvider { private final IPageRendererProvider delegate ; public LastPageRecordingPageRendererProvider ( IPageRendererProvider delegate ) { } public PageRenderer get ( RenderPageRequestHandler handler ) { } } private class TestExceptionMapper implements IExceptionMapper { private final IExceptionMapper delegate ; public TestExceptionMapper ( IExceptionMapper delegate ) { } public IRequestHandler map ( Exception e ) { } } private class TestRequestCycleProvider implements IRequestCycleProvider { private final IRequestCycleProvider delegate ; public TestRequestCycleProvider ( IRequestCycleProvider delegate ) { } public RequestCycle get ( RequestCycleContext context ) { } } private class TestRequestMapper implements IRequestMapper { private final IRequestMapper delegate ; public TestRequestMapper ( IRequestMapper delegate ) { } public int getCompatibilityScore ( Request request ) { } public Url mapHandler ( IRequestHandler requestHandler ) { } public IRequestHandler mapRequest ( Request request ) { } } }

Fix:
String contentType = getLastResponse ( ) . getContentType ( ) ;