// Path: common/src/main/java/io/spring/cloud/samples/brewery/common/TestConfigurationHolder.java
// @Data
// @Builder
// public class TestConfigurationHolder {
// 	public static final String TEST_COMMUNICATION_TYPE_HEADER_NAME = "TEST-COMMUNICATION-TYPE";
// 	public static final ThreadLocal<TestConfigurationHolder> TEST_CONFIG = new ThreadLocal<>();
// 
// 	private TestCommunicationType testCommunicationType;
// 
// 	public enum TestCommunicationType {
// 		FEIGN, REST_TEMPLATE
// 	}
// }
// 
// Path: common/src/main/java/io/spring/cloud/samples/brewery/common/model/Ingredient.java
// @Data
// public class Ingredient {
//     private IngredientType type;
//     private Integer quantity;
// 
//     public Ingredient(IngredientType type, Integer quantity) {
//         this.type = type;
//         this.quantity = quantity;
//     }
// 
//     public Ingredient() {
//     }
// }
// 
// Path: common/src/main/java/io/spring/cloud/samples/brewery/common/model/Order.java
// @Data
// public class Order {
//     private List<IngredientType> items = new ArrayList<>();
// }
// 
// Path: common/src/main/java/io/spring/cloud/samples/brewery/common/TestRequestEntityBuilder.java
// public static TestRequestEntityBuilder requestEntity() {
// 	return new TestRequestEntityBuilder();
// }


import io.spring.cloud.samples.brewery.common.TestConfigurationHolder;
import io.spring.cloud.samples.brewery.common.model.Ingredient;
import io.spring.cloud.samples.brewery.common.model.Order;
import org.slf4j.Logger;
import org.springframework.http.HttpMethod;
import org.springframework.web.client.RestTemplate;
import java.lang.invoke.MethodHandles;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.stream.Collectors;
import static io.spring.cloud.samples.brewery.common.TestConfigurationHolder.TestCommunicationType.FEIGN;
import static io.spring.cloud.samples.brewery.common.TestRequestEntityBuilder.requestEntity;
import static org.slf4j.LoggerFactory.getLogger;
package io.spring.cloud.samples.brewery.aggregating;




class IngredientsCollector {

	private static final Logger log = getLogger(MethodHandles.lookup().lookupClass());

	private final RestTemplate restTemplate;
	private final IngredientsProxy ingredientsProxy;

	public IngredientsCollector(RestTemplate restTemplate, IngredientsProxy ingredientsProxy) {
		this.restTemplate = restTemplate;
		this.ingredientsProxy = ingredientsProxy;
	}

// Path: common/src/main/java/io/spring/cloud/samples/brewery/common/TestConfigurationHolder.java
// @Data
// @Builder
// public class TestConfigurationHolder {
// 	public static final String TEST_COMMUNICATION_TYPE_HEADER_NAME = "TEST-COMMUNICATION-TYPE";
// 	public static final ThreadLocal<TestConfigurationHolder> TEST_CONFIG = new ThreadLocal<>();
// 
// 	private TestCommunicationType testCommunicationType;
// 
// 	public enum TestCommunicationType {
// 		FEIGN, REST_TEMPLATE
// 	}
// }
// 
// Path: common/src/main/java/io/spring/cloud/samples/brewery/common/model/Ingredient.java
// @Data
// public class Ingredient {
//     private IngredientType type;
//     private Integer quantity;
// 
//     public Ingredient(IngredientType type, Integer quantity) {
//         this.type = type;
//         this.quantity = quantity;
//     }
// 
//     public Ingredient() {
//     }
// }
// 
// Path: common/src/main/java/io/spring/cloud/samples/brewery/common/model/Order.java
// @Data
// public class Order {
//     private List<IngredientType> items = new ArrayList<>();
// }
// 
// Path: common/src/main/java/io/spring/cloud/samples/brewery/common/TestRequestEntityBuilder.java
// public static TestRequestEntityBuilder requestEntity() {
// 	return new TestRequestEntityBuilder();
// }


// Path: brewing/src/main/java/io/spring/cloud/samples/brewery/aggregating/IngredientsCollector.java
import io.spring.cloud.samples.brewery.common.TestConfigurationHolder;
import io.spring.cloud.samples.brewery.common.model.Ingredient;
import io.spring.cloud.samples.brewery.common.model.Order;
import org.slf4j.Logger;
import org.springframework.http.HttpMethod;
import org.springframework.web.client.RestTemplate;
import java.lang.invoke.MethodHandles;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.stream.Collectors;
import static io.spring.cloud.samples.brewery.common.TestConfigurationHolder.TestCommunicationType.FEIGN;
import static io.spring.cloud.samples.brewery.common.TestRequestEntityBuilder.requestEntity;
import static org.slf4j.LoggerFactory.getLogger;

package io.spring.cloud.samples.brewery.aggregating;




class IngredientsCollector {

	private static final Logger log = getLogger(MethodHandles.lookup().lookupClass());

	private final RestTemplate restTemplate;
	private final IngredientsProxy ingredientsProxy;

	public IngredientsCollector(RestTemplate restTemplate, IngredientsProxy ingredientsProxy) {
		this.restTemplate = restTemplate;
		this.ingredientsProxy = ingredientsProxy;
	}

	List<Ingredient> collectIngredients(Order order, String processId) {