@@ -0,0 +1,1739 @@
+/*%0A *%0A *  * Copyright 2013 the original author or authors.%0A *  *%0A *  * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A *  * you may not use this file except in compliance with the License.%0A *  * You may obtain a copy of the License at%0A *  *%0A *  *      http://www.apache.org/licenses/LICENSE-2.0%0A *  *%0A *  * Unless required by applicable law or agreed to in writing, software%0A *  * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A *  * See the License for the specific language governing permissions and%0A *  * limitations under the License.%0A *  %0A */%0A%0Apackage tests.as;%0A%0Aimport leap.oauth2.OAuth2Constants;%0Aimport org.junit.Test;%0Aimport tests.OAuth2TestBase;%0Aimport tests.TokenResponse;%0A%0A/**%0A * @author kael.%0A */%0Apublic class AuthorizeEndpointTest extends OAuth2TestBase %7B%0A    @Test%0A    public void testRequestAuthzWithAt()%7B%0A        TokenResponse at = obtainAccessTokenByPassword(USER_XIAOMING, PASS_XIAOMING,%22app2%22,%22app2_secret%22);%0A        forGet(%22/server%22+AUTHZ_ENDPOINT).addHeader(OAuth2Constants.TOKEN_HEADER,%22Bearer %22 + at.accessToken)%0A                .addQueryParam(%22response_type%22,%22code%22)%0A                .addQueryParam(%22redirect_uri%22,%22http://localhost:8080/clientapp2/auth_redirect%22)%0A                .addQueryParam(%22client_id%22,%22app2%22)%0A                .send().assertOk().getContent()%0A                .contains(%22/login%22);%0A        %0A        forPost(%22/server/login%22).addHeader(OAuth2Constants.TOKEN_HEADER,%22Bearer %22 + at.accessToken)%0A                .addFormParam(%22return_url%22,%22http://localhost:8080/clientapp2/auth_redirect%22)%0A                .send().assertOk().getContent()%0A                .contains(%22/login%22);%0A    %7D%0A    %0A%7D%0A

add test unit