@@ -0,0 +1,3798 @@
+/*%0A * Copyright 2013-2018 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%0Apackage org.cloudfoundry.uaa;%0A%0Aimport org.cloudfoundry.AbstractIntegrationTest;%0Aimport org.cloudfoundry.uaa.serverinformation.AutoLoginRequest;%0Aimport org.cloudfoundry.uaa.serverinformation.GetAutoLoginAuthenticationCodeRequest;%0Aimport org.cloudfoundry.uaa.serverinformation.GetAutoLoginAuthenticationCodeResponse;%0Aimport org.cloudfoundry.uaa.serverinformation.GetInfoRequest;%0Aimport org.junit.Test;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport reactor.core.publisher.Mono;%0Aimport reactor.test.StepVerifier;%0A%0Aimport java.time.Duration;%0A%0Apublic final class ServerInformationTest extends AbstractIntegrationTest %7B%0A%0A    @Autowired%0A    private String clientId;%0A%0A    @Autowired%0A    private String clientSecret;%0A%0A    @Autowired%0A    private String password;%0A%0A    @Autowired%0A    private UaaClient uaaClient;%0A%0A    @Autowired%0A    private String username;%0A%0A    @Test%0A    public void autoLogin() %7B%0A        getAuthenticationCode(this.uaaClient, this.clientId, this.clientSecret, this.password, this.username)%0A            .then(code -%3E this.uaaClient.serverInformation()%0A                .autoLogin(AutoLoginRequest.builder()%0A                    .clientId(this.clientId)%0A                    .code(code)%0A                    .build()))%0A            .as(StepVerifier::create)%0A            .expectComplete()%0A            .verify(Duration.ofMinutes(5));%0A    %7D%0A%0A    @Test%0A    public void getAutoLoginAuthenticationCode() %7B%0A        this.uaaClient.serverInformation()%0A            .getAuthenticationCode(GetAutoLoginAuthenticationCodeRequest.builder()%0A                .clientId(this.clientId)%0A                .clientSecret(this.clientSecret)%0A                .password(this.password)%0A                .username(this.username)%0A                .build())%0A            .map(GetAutoLoginAuthenticationCodeResponse::getPath)%0A            .as(StepVerifier::create)%0A            .expectNext(%22/oauth/authorize%22)%0A            .expectComplete()%0A            .verify(Duration.ofMinutes(5));%0A    %7D%0A%0A    @Test%0A    public void getInfo() %7B%0A        this.uaaClient.serverInformation()%0A            .getInfo(GetInfoRequest.builder()%0A                .build())%0A            .map(response -%3E response.getLinks().getPassword())%0A            .as(StepVerifier::create)%0A            .expectNext(%22/forgot_password%22)%0A            .expectComplete()%0A            .verify(Duration.ofMinutes(5));%0A    %7D%0A%0A    private static Mono%3CString%3E getAuthenticationCode(UaaClient uaaClient, String clientId, String clientSecret, String password, String username) %7B%0A        return requestAuthenticationCode(uaaClient, clientId, clientSecret, password, username)%0A            .map(GetAutoLoginAuthenticationCodeResponse::getCode);%0A    %7D%0A%0A    private static Mono%3CGetAutoLoginAuthenticationCodeResponse%3E requestAuthenticationCode(UaaClient uaaClient, String clientId, String clientSecret, String password, String username) %7B%0A        return uaaClient.serverInformation()%0A            .getAuthenticationCode(GetAutoLoginAuthenticationCodeRequest.builder()%0A                .clientId(clientId)%0A                .clientSecret(clientSecret)%0A                .password(password)%0A                .username(username)%0A                .build());%0A    %7D%0A%0A%7D

Add Tests for Server Information