private static Predicate predicateForNewServices(AddServiceInfo request) {
    return new AndPredicate(
      new EqualsPredicate<>(ServiceResourceProvider.SERVICE_CLUSTER_NAME_PROPERTY_ID, request.clusterName()),
      OrPredicate.of(
        request.newServices().keySet().stream()
          .map(service -> new EqualsPredicate<>(ServiceResourceProvider.SERVICE_SERVICE_NAME_PROPERTY_ID, service))
          .collect(toList())
      )
    );
  }
Creates a {@link ConfigurationRequest} for each config type in the {@code configTypes} stream.

@return an {@code Optional} {@link ClusterRequest} with desired configs set to all the {@code ConfigurationRequests},
or an empty {@code Optional} if the incoming {@code configTypes} stream is empty
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/ResourceProviderAdapter.java