complexDispatcherPortlet.processAction(request, response);
assertEquals("edit was here", response.getRenderParameter("param"));
}
public void testPortletModeMappingEditActionRequestWithUnauthorizedUserRole() throws Exception {
MockActionRequest request = new MockActionRequest();
MockActionResponse response = new MockActionResponse();
request.setPortletMode(PortletMode.EDIT);
request.addUserRole("role3");
request.setParameter("action", "not mapped");
request.setParameter("myParam", "not mapped");
complexDispatcherPortlet.processAction(request, response);
String exception = response.getRenderParameter(DispatcherPortlet.ACTION_EXCEPTION_RENDER_PARAMETER);
assertNotNull(exception);
String name = PortletSecurityException.class.getName();
assertTrue(exception.startsWith(name));