// Path: src/main/java/com/webfluxclient/metadata/request/RequestHeader.java
// @EqualsAndHashCode
// class DynamicRequestHeader implements RequestHeader {
// 
//     private String name;
// 
//     public DynamicRequestHeader(String name) {
//         this.name = name;
//     }
// 
//     @Override
//     public String getName() {
//         return name;
//     }
// 
//     @Override
//     public List<String> getValues(Map<String, List<String>> parameterValues) {
//         return parameterValues.getOrDefault(name, Collections.emptyList());
//     }
// 
// }


import com.webfluxclient.metadata.request.RequestHeader.DynamicRequestHeader;
import org.assertj.core.api.Assertions;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.http.HttpHeaders;
import java.util.AbstractMap.SimpleEntry;
import java.util.HashMap;
import java.util.Map;
import static java.util.Arrays.asList;
import static java.util.Collections.emptyList;
import static java.util.Collections.emptyMap;
import static java.util.Collections.singletonList;
import static java.util.Collections.singletonMap;
package com.webfluxclient.metadata.request;




@RunWith(MockitoJUnitRunner.class)
public class RequestHeadersTest {

    @Test
    public void requestHeaders_withDynamicHeader() {
        RequestHeaders requestHeaders = getDynamic("header1", 0);

        HttpHeaders httpHeaders = requestHeaders.encode(new Object[]{"headerDynamicHeader"});
        Assertions.assertThat(httpHeaders)
                .containsExactly(new SimpleEntry<>("header1", singletonList("headerDynamicHeader")));
    }

    @Test
    public void requestHeaders_withStaticHeader() {
        RequestHeaders requestHeaders = getBasic("header1", "headerBasicValue");

        HttpHeaders httpHeaders = requestHeaders.encode(new Object[]{});
        Assertions.assertThat(httpHeaders)
                .containsExactly(new SimpleEntry<>("header1", singletonList("headerBasicValue")));
    }

    @Test
    public void requestHeaders_withStaticAndDynamicHeaders() {
        Map<String, RequestHeader> requestHeaderByName = new HashMap<>();
// Path: src/main/java/com/webfluxclient/metadata/request/RequestHeader.java
// @EqualsAndHashCode
// class DynamicRequestHeader implements RequestHeader {
// 
//     private String name;
// 
//     public DynamicRequestHeader(String name) {
//         this.name = name;
//     }
// 
//     @Override
//     public String getName() {
//         return name;
//     }
// 
//     @Override
//     public List<String> getValues(Map<String, List<String>> parameterValues) {
//         return parameterValues.getOrDefault(name, Collections.emptyList());
//     }
// 
// }


// Path: src/test/java/com/webfluxclient/metadata/request/RequestHeadersTest.java
import com.webfluxclient.metadata.request.RequestHeader.DynamicRequestHeader;
import org.assertj.core.api.Assertions;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.http.HttpHeaders;
import java.util.AbstractMap.SimpleEntry;
import java.util.HashMap;
import java.util.Map;
import static java.util.Arrays.asList;
import static java.util.Collections.emptyList;
import static java.util.Collections.emptyMap;
import static java.util.Collections.singletonList;
import static java.util.Collections.singletonMap;

package com.webfluxclient.metadata.request;




@RunWith(MockitoJUnitRunner.class)
public class RequestHeadersTest {

    @Test
    public void requestHeaders_withDynamicHeader() {
        RequestHeaders requestHeaders = getDynamic("header1", 0);

        HttpHeaders httpHeaders = requestHeaders.encode(new Object[]{"headerDynamicHeader"});
        Assertions.assertThat(httpHeaders)
                .containsExactly(new SimpleEntry<>("header1", singletonList("headerDynamicHeader")));
    }

    @Test
    public void requestHeaders_withStaticHeader() {
        RequestHeaders requestHeaders = getBasic("header1", "headerBasicValue");

        HttpHeaders httpHeaders = requestHeaders.encode(new Object[]{});
        Assertions.assertThat(httpHeaders)
                .containsExactly(new SimpleEntry<>("header1", singletonList("headerBasicValue")));
    }

    @Test
    public void requestHeaders_withStaticAndDynamicHeaders() {
        Map<String, RequestHeader> requestHeaderByName = new HashMap<>();
        requestHeaderByName.put("header1", new RequestHeader.DynamicRequestHeader("header1"));