Buggy code:
public class MockHttpServletRequest implements HttpServletRequest { private final Application application ; private final ValueMap attributes = new ValueMap ( ) ; private String authType ; private String characterEncoding ; private final ServletContext context ; private final List cookies = new ArrayList ( ) ; private final ValueMap headers = new ValueMap ( ) ; private String method ; private final ValueMap parameters = new ValueMap ( ) ; private String path ; private final HttpSession session ; public MockHttpServletRequest ( final Application application , final HttpSession session , final ServletContext context ) { } public void addCookie ( final Cookie cookie ) { } public void addHeader ( String name , String value ) { } public Object getAttribute ( final String name ) { } public Enumeration getAttributeNames ( ) { } public String getAuthType ( ) { } public String getCharacterEncoding ( ) { } public int getContentLength ( ) { } public String getContentType ( ) { } public String getContextPath ( ) { } public Cookie [ ] getCookies ( ) { } public long getDateHeader ( final String name ) throws IllegalArgumentException { } public String getHeader ( final String name ) { } public Enumeration getHeaderNames ( ) { } public Enumeration getHeaders ( final String name ) { } public ServletInputStream getInputStream ( ) throws IOException { } public int getIntHeader ( final String name ) { } public Locale getLocale ( ) { } public Enumeration getLocales ( ) { } public String getMethod ( ) { } public String getParameter ( final String name ) { } public Map getParameterMap ( ) { } public Enumeration getParameterNames ( ) { } public String [ ] getParameterValues ( final String name ) { } public String getPathInfo ( ) { } public String getPathTranslated ( ) { } public String getProtocol ( ) { } public String getQueryString ( ) { } public BufferedReader getReader ( ) throws IOException { } public String getRealPath ( String name ) { } public String getRemoteAddr ( ) { } public String getRemoteHost ( ) { } public String getRemoteUser ( ) { } public RequestDispatcher getRequestDispatcher ( String name ) { } public String getRequestedSessionId ( ) { } public String getRequestURI ( ) { } public StringBuffer getRequestURL ( ) { } public String getScheme ( ) { } public String getServerName ( ) { } public int getServerPort ( ) { } public String getServletPath ( ) { } public HttpSession getSession ( ) { } public HttpSession getSession ( boolean b ) { } public Principal getUserPrincipal ( ) { } public void initialize ( ) { } public boolean isRequestedSessionIdFromCookie ( ) { } public boolean isRequestedSessionIdFromUrl ( ) { } public boolean isRequestedSessionIdFromURL ( ) { } public boolean isRequestedSessionIdValid ( ) { } public boolean isSecure ( ) { } public boolean isUserInRole ( String name ) { } public void removeAttribute ( final String name ) { } public void setAttribute ( final String name , final Object o ) { } public void setAuthType ( final String authType ) { } public void setCharacterEncoding ( final String encoding ) throws UnsupportedEncodingException { } public void setCookies ( final Cookie [ ] theCookies ) { } public void setMethod ( final String method ) { } public void setParmeter ( final String name , final String value ) { } public void setPath ( final String path ) { } public void setRequestToBookmarkablePage ( final Page page , final Map params ) { } public void setRequestToComponent ( final Component component ) { parameters . put ( "component" , component . getPath ( ) ) ; <START_BUG> parameters . put ( "version" , ( "" + ( component . getPage ( ) . getVersion ( ) ) ) ) ; <END_BUG> Class c = null ; if ( component instanceof IRedirectListener ) { c = IRedirectListener . class ; } else if ( component instanceof IResourceListener ) { c = IResourceListener . class ; } else if ( component instanceof IFormSubmitListener ) { c = IFormSubmitListener . class ; } else if ( component instanceof ILinkListener ) { c = ILinkListener . class ; } else if ( component instanceof IOnChangeListener ) { c = IOnChangeListener . class ; } if ( c != null ) { parameters . put ( "interface" , Classes . name ( c ) ) ; } } public void setRequestToFormComponent ( final Form form , final Map values ) { } public void setRequestToRedirectString ( final String redirect ) { } private void setDefaultHeaders ( ) { } }

Fix:
parameters . put ( "revision" , ( "" + ( component . getPage ( ) . getRevisionNumber ( ) ) ) ) ;