public static void writeErrMsg(HttpServletResponse response, int httpCode, String msg) {
        response.setStatus(httpCode);
        try {
            response.getWriter().println(msg);
        } catch (IOException e) {
            DEFAULT_LOG.error("ResponseUtil:writeErrMsg wrong", e);
        }
    }
@Test
    void testWriteErrMsg() {
        MockHttpServletResponse response = new MockHttpServletResponse();
        ResponseUtil.writeErrMsg(response, 404, "test");
        assertEquals(404, response.getStatus());
        try {
            assertEquals("test" + lineSeparator, response.getContentAsString());
        } catch (UnsupportedEncodingException e) {
            System.out.println(e.toString());
        }
    }