Source:
public void testDoGetHttpServletRequestHttpServletResponseWithDispatcher ( ) throws java.io.IOException , javax.servlet.ServletException { org.mockito.Mockito.when ( mockRequest.getAttribute ( LocaleFilter.LOCALE ) ) . thenReturn ( java.util.Locale.JAPANESE ) ; org.mockito.Mockito.when ( mockRequest.getRequestDispatcher ( "/WEB-INF/ovirt-engine.jsp" ) ) . thenReturn ( mockDispatcher ) ; org.mockito.Mockito.when ( mockRequest.getRequestURL ( ) ) . thenReturn ( new java.lang.StringBuffer ( "http://localhost:8080/ovirt-engine/" ) ) ; org.mockito.Mockito.when ( mockRequest.getServletContext ( ) ) . thenReturn ( mockContext ) ; org.mockito.Mockito.when ( mockRequest.getSession ( true ) ) . thenReturn ( mockSession ) ; org.mockito.Mockito.when ( mockSession.getAttribute ( "authCode" ) ) . thenReturn ( "aU1KZG1OUytQSktnd29SQ3NIOVhWckls" ) ; org.mockito.Mockito.when ( mockSession.getAttribute ( "token" ) ) . thenReturn ( "aU1KZG1OUytQSktnd29SQ3NIOVhWckls" ) ; org.mockito.Mockito.when ( mockSession.getAttribute ( "error" ) ) . thenReturn ( "" ) ; org.mockito.Mockito.when ( mockSession.getAttribute ( "error_code" ) ) . thenReturn ( "" ) ; org.mockito.Mockito.when ( mockRequest.getServletContext ( ) . getAttribute ( "sso_logout_url" ) ) . thenReturn ( new java.lang.StringBuffer ( "http://localhost:8080/ovirt-engine/logout" ) ) ; org.mockito.Mockito.when ( mockRequest.getServletContext ( ) . getAttribute ( "sso_switch_user_url" ) ) . thenReturn ( new java.lang.StringBuffer ( "http://localhost:8080/ovirt-engine/login" ) ) ; testServlet.doGet ( mockRequest , mockResponse ) ; org.mockito.Mockito.verify ( mockRequest ) . setAttribute ( "localeKeys" , localeKeys ) ; org.mockito.Mockito.verify ( mockResponse ) . setContentType ( "text/html;charset=UTF-8" ) ; org.mockito.Mockito.verify ( mockDispatcher ) . include ( mockRequest , mockResponse ) ; }

Target:
public void testDoGetHttpServletRequestHttpServletResponseWithDispatcher ( ) throws java.io.IOException , javax.servlet.ServletException { org.mockito.Mockito.when ( mockRequest.getAttribute ( LocaleFilter.LOCALE ) ) . thenReturn ( java.util.Locale.JAPANESE ) ; org.mockito.Mockito.when ( mockRequest.getRequestDispatcher ( "/WEB-INF/ovirt-engine.jsp" ) ) . thenReturn ( mockDispatcher ) ; org.mockito.Mockito.when ( mockRequest.getRequestURL ( ) ) . thenReturn ( new java.lang.StringBuffer ( "http://localhost:8080/ovirt-engine/" ) ) ; org.mockito.Mockito.when ( mockRequest.getServletContext ( ) ) . thenReturn ( mockContext ) ; org.mockito.Mockito.when ( mockRequest.getSession ( true ) ) . thenReturn ( mockSession ) ; org.mockito.Mockito.when ( mockSession.getAttribute ( "authCode" ) ) . thenReturn ( "aU1KZG1OUytQSktnd29SQ3NIOVhWckls" ) ; org.mockito.Mockito.when ( mockSession.getAttribute ( "token" ) ) . thenReturn ( "aU1KZG1OUytQSktnd29SQ3NIOVhWckls" ) ; org.mockito.Mockito.when ( mockSession.getAttribute ( "error" ) ) . thenReturn ( "" ) ; org.mockito.Mockito.when ( mockSession.getAttribute ( "error_description" ) ) . thenReturn ( "" ) ; org.mockito.Mockito.when ( mockRequest.getServletContext ( ) . getAttribute ( "sso_logout_url" ) ) . thenReturn ( new java.lang.StringBuffer ( "http://localhost:8080/ovirt-engine/logout" ) ) ; org.mockito.Mockito.when ( mockRequest.getServletContext ( ) . getAttribute ( "sso_switch_user_url" ) ) . thenReturn ( new java.lang.StringBuffer ( "http://localhost:8080/ovirt-engine/login" ) ) ; testServlet.doGet ( mockRequest , mockResponse ) ; org.mockito.Mockito.verify ( mockRequest ) . setAttribute ( "localeKeys" , localeKeys ) ; org.mockito.Mockito.verify ( mockResponse ) . setContentType ( "text/html;charset=UTF-8" ) ; org.mockito.Mockito.verify ( mockDispatcher ) . include ( mockRequest , mockResponse ) ; }