use of org.cloudfoundry.client.v2.resourcematch.ListMatchingResourcesRequest in project cf-java-client by cloudfoundry.
the class DefaultApplicationsTest method requestListMatchingResources.
private static void requestListMatchingResources(CloudFoundryClient cloudFoundryClient, Collection<ResourceMatchingUtils.ArtifactMetadata> artifactMetadatas) {
ListMatchingResourcesRequest request = artifactMetadatas.stream().reduce(ListMatchingResourcesRequest.builder(), (builder, artifactMetadata) -> builder.resource(Resource.builder().hash(artifactMetadata.getHash()).mode(artifactMetadata.getPermissions()).size(artifactMetadata.getSize()).build()), (a, b) -> a.addAllResources(b.build().getResources())).build();
when(cloudFoundryClient.resourceMatch().list(request)).thenReturn(Mono.just(ListMatchingResourcesResponse.builder().build()));
}
Aggregations