public void testPassAllParametersToRenderPhaseDoesNotPropagateExceptionIfRedirectAlreadySentAtTimeOfCall() throws Exception {
MockActionRequest request = new MockActionRequest();
request.setParameter("William", "Baskerville");
request.setParameter("Adso", "Melk");
MockActionResponse response = new MockActionResponse() {
public void setRenderParameter(String key, String[] values) {
throw new IllegalStateException();
}
};
PortletUtils.passAllParametersToRenderPhase(request, response);
assertEquals("The render parameters map must not be being populated with the request parameters (Action.sendRedirect(..) aleady called).",
0, response.getRenderParameterMap().size());
}