diff --git a/integration-test/src/test/java/org/cloudfoundry/uaa/ServerInformationTest.java b/integration-test/src/test/java/org/cloudfoundry/uaa/ServerInformationTest.java index 2c25a2be7cf..c8c9353c26b 100644 --- a/integration-test/src/test/java/org/cloudfoundry/uaa/ServerInformationTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/uaa/ServerInformationTest.java @@ -27,6 +27,9 @@ import reactor.test.StepVerifier; import java.time.Duration; +import java.util.function.Consumer; + +import static org.assertj.core.api.Assertions.assertThat; public final class ServerInformationTest extends AbstractIntegrationTest { @@ -81,11 +84,15 @@ public void getInfo() { .build()) .map(response -> response.getLinks().getPassword()) .as(StepVerifier::create) - .expectNext("/forgot_password") + .consumeNextWith(endsWithExpectation("/forgot_password")) .expectComplete() .verify(Duration.ofMinutes(5)); } + private static Consumer endsWithExpectation(String suffix) { + return actual -> assertThat(actual).endsWith(suffix); + } + private static Mono getAuthenticationCode(UaaClient uaaClient, String clientId, String clientSecret, String password, String username) { return requestAuthenticationCode(uaaClient, clientId, clientSecret, password, username) .map(GetAutoLoginAuthenticationCodeResponse::getCode);