// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.controller.api.integration.resource; import com.yahoo.vespa.hosted.controller.api.identifiers.Property; import java.util.Map; import java.util.function.Consumer; /** * @author ldalves */ public class CostReportConsumerMock implements CostReportConsumer { private final Consumer csvConsumer; private final Map fixedAllocations; public CostReportConsumerMock() { this.csvConsumer = (ignored) -> {}; this.fixedAllocations = Map.of(); } public CostReportConsumerMock(Consumer csvConsumer, Map fixedAllocations) { this.csvConsumer = csvConsumer; this.fixedAllocations = Map.copyOf(fixedAllocations); } @Override public void consume(String csv) { csvConsumer.accept(csv); } @Override public Map fixedAllocations() { return fixedAllocations; } }