use of org.cloudfoundry.uaa.clients.BatchChangeSecretResponse in project cf-java-client by cloudfoundry.
the class ClientsTest method batchChangeSecret.
@Test
public void batchChangeSecret() {
String clientId1 = this.nameFactory.getClientId();
String clientId2 = this.nameFactory.getClientId();
String clientSecret = this.nameFactory.getClientSecret();
String newClientSecret1 = this.nameFactory.getClientSecret();
String newClientSecret2 = this.nameFactory.getClientSecret();
requestCreateClient(this.uaaClient, clientId1, clientSecret).then(requestCreateClient(this.uaaClient, clientId2, clientSecret)).then(this.uaaClient.clients().batchChangeSecret(BatchChangeSecretRequest.builder().changeSecret(ChangeSecret.builder().clientId(clientId1).oldSecret(clientSecret).secret(newClientSecret1).build(), ChangeSecret.builder().clientId(clientId2).oldSecret(clientSecret).secret(newClientSecret2).build()).build())).flatMapIterable(BatchChangeSecretResponse::getClients).as(StepVerifier::create).expectNextCount(2).expectComplete().verify(Duration.ofMinutes(5));
}
Aggregations