Example usage for com.liferay.portal.kernel.util Portal getOriginalServletRequest

List of usage examples for com.liferay.portal.kernel.util Portal getOriginalServletRequest

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util Portal getOriginalServletRequest.

Prototype

public HttpServletRequest getOriginalServletRequest(HttpServletRequest httpServletRequest);

Source Link

Usage

From source file:com.liferay.blogs.web.internal.portlet.action.TrackbackMVCActionCommandTest.java

License:Open Source License

protected void setUpPortalUtil() throws Exception {
    PortalUtil portalUtil = new PortalUtil();

    Portal portal = mock(Portal.class);

    when(portal.getOriginalServletRequest((HttpServletRequest) Matchers.any()))
            .thenReturn(_mockOriginalServletRequest);

    when(portal.getHttpServletRequest((PortletRequest) Matchers.any())).thenReturn(_mockHttpServletRequest);

    when(portal.getHttpServletResponse((PortletResponse) Matchers.any())).thenReturn(_mockHttpServletResponse);

    portalUtil.setPortal(portal);//from  ww w .  ja  v  a  2s. c om
}