コード例 #1
0
 @Test
 public void setCharacterEncodingThenContentType() {
   response.setCharacterEncoding("UTF-8");
   response.setContentType("test/plain");
   assertEquals("test/plain", response.getContentType());
   assertEquals("test/plain;charset=UTF-8", response.getHeader("Content-Type"));
   assertEquals("UTF-8", response.getCharacterEncoding());
 }