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

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

Introduction

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

Prototype

public HttpServletResponse getHttpServletResponse(PortletResponse portletResponse);

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);// www.  ja  va  2  s . c o  m
}