private void generateResponse(final HttpServletResponse response, final List<ConfigGroupEnum> changedGroups) {
        try {
            response.setHeader("Pragma", "no-cache");
            response.setDateHeader("Expires", 0);
            response.setHeader("Cache-Control", "no-cache,no-store");
            response.setContentType(MediaType.APPLICATION_JSON_VALUE);
            response.setStatus(HttpServletResponse.SC_OK);
            response.getWriter().println(GsonUtils.getInstance().toJson(ShenyuAdminResult.success(ShenyuResultMessage.SUCCESS, changedGroups)));
        } catch (IOException ex) {
            LOG.error("Sending response failed.", ex);
        }
    }
@Test
    public void testGenerateResponse() throws UnsupportedEncodingException {
        List<ConfigGroupEnum> changedGroups = new ArrayList<>();
        changedGroups.add(ConfigGroupEnum.PLUGIN);
        this.httpServletResponse.setHeader("Pragma", "no-cache");
        this.httpServletResponse.setDateHeader("Expires", 0);
        this.httpServletResponse.setHeader("Cache-Control", "no-cache,no-store");
        this.httpServletResponse.setContentType(MediaType.APPLICATION_JSON_VALUE);
        this.httpServletResponse.setStatus(MockHttpServletResponse.SC_OK);
        this.httpServletResponse.getWriter().println(GsonUtils.getInstance().toJson(ShenyuAdminResult.success(ShenyuResultMessage.SUCCESS, changedGroups)));
    }