Description
V2ResponseTests_MimeResponse_ApiRender_setContentType4 and V2ResponseTests_RenderResponse_ApiRender_setContentType2 simply try to call portletResp.setContentType("Invalid") in order to verify that IllegalArgumentException is thrown.
While these tests are verifying a requirement as to validity of a content-type value, they execute after MimeResponse.getWriter() has been called. This conflicts with the JavaDoc requirements in MimeResponse.setContentType(String) which state:
The portlet should set the content type before calling getWriter() or getPortletOutputStream().
The fix would be to re-order the test code so that the TCK calls portletResp.setContentType("Invalid") prior to calling getWriter().