    @Test
    public void authorizeTest() throws Exception {

        Map<String, Object> params = new HashMap<>();
        params.put("response_type", ResponseType.AUTHORIZATION_CODE.getType());
        params.put("client_id", CLIENT_ID);
        params.put("redirect_uri", REDIRECT_URI);
        Response response = RestAssured.with().params(params).cookies(resp4Login.cookies()).get(PATH_OAUTH_AUTHORIZE_CODE);
        Assert.assertEquals(200, response.getStatusCode());
        // System.out.println(response.asString());
        response = MockUserOperationUtils.authorizationCodeUserAuthorize(response, resp4Login.cookies(), ALL_SCOPE, StringUtils.EMPTY);
        System.out.println(response.asString());
        Assert.assertEquals(302, response.getStatusCode());
        String redirectUrl = response.getHeader("Location");
        System.out.println(redirectUrl);
        response = RestAssured.with().redirects().follow(false).cookies(resp4Login.getCookies()).cookies(response.cookies()).get(redirectUrl);
        System.out.println(response.getHeader("Location"));
        Map<String, String> results = ResultUtils.getLocationUrlParamsValue(response);
        Assert.assertNotNull(results.get("code"));
    }