use of org.cloudfoundry.uaa.clients.BatchCreateClientsResponse in project cf-java-client by cloudfoundry.
the class ClientsTest method batchDelete.
@Test
public void batchDelete() {
String clientId1 = this.nameFactory.getClientId();
String clientId2 = this.nameFactory.getClientId();
String clientSecret = this.nameFactory.getClientSecret();
batchCreateClients(this.uaaClient, clientId1, clientId2, clientSecret).flatMapIterable(BatchCreateClientsResponse::getClients).map(Client::getClientId).collectList().flatMap(clientIds -> this.uaaClient.clients().batchDelete(BatchDeleteClientsRequest.builder().clientIds(clientIds).build())).thenMany(requestListClients(this.uaaClient)).filter(client -> clientId1.equals(client.getClientId()) || clientId2.equals(client.getClientId())).as(StepVerifier::create).expectComplete().verify(Duration.ofMinutes(5));
}
Aggregations