// Path: src/main/java/com/webfluxclient/codec/ErrorDecoder.java
// public interface ErrorDecoder<T extends RuntimeException> {
//     
//     /**
//      * Whether the decoder supports the given target status code of the response.
//      *
//      * @param httpStatus the status code received by the client
//      * @return {@code true} if supported, {@code false} otherwise
//      */
//     boolean canDecode(HttpStatus httpStatus);
//     
//     /**
//      * @param httpStatus  the status code received by the client
//      * @param inputStream the {@code InputStream} input stream to decode
//      * @return the decoded exception
//      */
//     T decode(HttpStatus httpStatus, DataBuffer inputStream);
//     
//     /**
//      * Return a new {@code ErrorDecoder} described by the given predicate and bifunction functions.
//      * All provided functions has to be initialized.
//      *
//      * @param statusPredicate the predicate function for accepted {@link HttpStatus}
//      * @param errorDecoder    the bifunction function to decode {@code InputStream}
//      * @return the new {@code ErrorDecoder}
//      */
//     static <T extends RuntimeException> ErrorDecoder<T> of(Predicate<HttpStatus> statusPredicate,
//                                                            BiFunction<HttpStatus, DataBuffer, T> errorDecoder) {
//         return new ErrorDecoder<T>() {
//             @Override
//             public boolean canDecode(HttpStatus httpStatus) {
//                 return statusPredicate.test(httpStatus);
//             }
//             
//             @Override
//             public T decode(HttpStatus httpStatus, DataBuffer inputMessage) {
//                 return errorDecoder.apply(httpStatus, inputMessage);
//             }
//         };
//     }
// }
// 
// Path: src/main/java/com/webfluxclient/codec/ExtendedClientCodecConfigurer.java
// public interface ExtendedClientCodecConfigurer extends ClientCodecConfigurer {
// 
//     List<HttpErrorReader> getErrorReaders();
// 
//     ExtendedCustomCodecs customCodecs();
// 
//     ExtendedClientDefaultCodecs defaultCodecs();
// 
//     static ExtendedClientCodecConfigurer create(){
//         return new DefaultExtendedClientCodecConfigurer();
//     }
// 
//     interface ExtendedClientDefaultCodecs extends ClientDefaultCodecs {
//         void httpClientErrorDecoder(HttpClientErrorDecoder clientErrorDecoder);
//         void httpServerErrorDecoder(HttpServerErrorDecoder serverErrorDecoder);
//     }
// 
//     interface ExtendedCustomCodecs extends CustomCodecs{
//         void errorReader(HttpErrorReader errorReader);
//         void errorDecoder(ErrorDecoder errorDecoder);
//     }
// }
// 
// Path: src/main/java/com/webfluxclient/codec/HttpClientErrorDecoder.java
// public class HttpClientErrorDecoder implements ErrorDecoder<HttpClientException> {
//     @Override
//     public boolean canDecode(HttpStatus httpStatus) {
//         return httpStatus.is4xxClientError();
//     }
// 
//     @Override
//     public HttpClientException decode(HttpStatus httpStatus, DataBuffer inputMessage) {
//         return new HttpClientException(httpStatus, DataBuffers.readToString(inputMessage));
//     }
// }
// 
// Path: src/main/java/com/webfluxclient/codec/HttpErrorReader.java
// public interface HttpErrorReader {
// 
//     /**
//      * Whether the given {@link HttpStatus} is supported by this reader.
//      * @param httpStatus received by the client
//      * @return {@code true} if supported, {@code false} otherwise
//      */
//     boolean canRead(HttpStatus httpStatus);
// 
//     /**
//      * Read from the input message and return a error {@link Flux}
//      *
//      * @param inputMessage the message to read from
//      * @return the error {@link Flux} with the decoded exception
//      * */
//     <T> Flux<T> read(ClientHttpResponse inputMessage);
// 
//     /**
//      * Read from the input message and return a error {@link Mono}
//      *
//      * @param inputMessage the message to read from
//      * @return the error {@link Mono} with the decoded exception
//      * */
//     <T> Mono<T> readMono(ClientHttpResponse inputMessage);
// 
// }
// 
// Path: src/main/java/com/webfluxclient/codec/HttpServerErrorDecoder.java
// public class HttpServerErrorDecoder implements ErrorDecoder<HttpServerException> {
//     @Override
//     public boolean canDecode(HttpStatus httpStatus) {
//         return httpStatus.is5xxServerError();
//     }
// 
//     @Override
//     public HttpServerException decode(HttpStatus httpStatus, DataBuffer inputMessage) {
//         return new HttpServerException(httpStatus, DataBuffers.readToString(inputMessage));
//     }
// }
// 
// Path: src/main/java/com/webfluxclient/handler/ReactiveInvocationHandlerFactory.java
// public interface ReactiveInvocationHandlerFactory {
//     InvocationHandler build(
//             ExtendedClientCodecConfigurer codecConfigurer,
//             List<RequestProcessor> requestProcessors,
//             List<ResponseProcessor> responseProcessors,
//             Logger logger,
//             LogLevel logLevel,
//             Class<?> target,
//             URI uri);
// }


import com.webfluxclient.codec.ErrorDecoder;
import com.webfluxclient.codec.ExtendedClientCodecConfigurer;
import com.webfluxclient.codec.HttpClientErrorDecoder;
import com.webfluxclient.codec.HttpErrorReader;
import com.webfluxclient.codec.HttpServerErrorDecoder;
import com.webfluxclient.handler.ReactiveInvocationHandlerFactory;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.http.HttpStatus;
import java.net.URI;
import java.util.List;
import java.util.Optional;
import java.util.function.Supplier;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyList;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.ArgumentMatchers.same;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
package com.webfluxclient;




@RunWith(MockitoJUnitRunner.class)
public class DefaultClientBuilderTest {

    @Mock
// Path: src/main/java/com/webfluxclient/codec/ErrorDecoder.java
// public interface ErrorDecoder<T extends RuntimeException> {
//     
//     /**
//      * Whether the decoder supports the given target status code of the response.
//      *
//      * @param httpStatus the status code received by the client
//      * @return {@code true} if supported, {@code false} otherwise
//      */
//     boolean canDecode(HttpStatus httpStatus);
//     
//     /**
//      * @param httpStatus  the status code received by the client
//      * @param inputStream the {@code InputStream} input stream to decode
//      * @return the decoded exception
//      */
//     T decode(HttpStatus httpStatus, DataBuffer inputStream);
//     
//     /**
//      * Return a new {@code ErrorDecoder} described by the given predicate and bifunction functions.
//      * All provided functions has to be initialized.
//      *
//      * @param statusPredicate the predicate function for accepted {@link HttpStatus}
//      * @param errorDecoder    the bifunction function to decode {@code InputStream}
//      * @return the new {@code ErrorDecoder}
//      */
//     static <T extends RuntimeException> ErrorDecoder<T> of(Predicate<HttpStatus> statusPredicate,
//                                                            BiFunction<HttpStatus, DataBuffer, T> errorDecoder) {
//         return new ErrorDecoder<T>() {
//             @Override
//             public boolean canDecode(HttpStatus httpStatus) {
//                 return statusPredicate.test(httpStatus);
//             }
//             
//             @Override
//             public T decode(HttpStatus httpStatus, DataBuffer inputMessage) {
//                 return errorDecoder.apply(httpStatus, inputMessage);
//             }
//         };
//     }
// }
// 
// Path: src/main/java/com/webfluxclient/codec/ExtendedClientCodecConfigurer.java
// public interface ExtendedClientCodecConfigurer extends ClientCodecConfigurer {
// 
//     List<HttpErrorReader> getErrorReaders();
// 
//     ExtendedCustomCodecs customCodecs();
// 
//     ExtendedClientDefaultCodecs defaultCodecs();
// 
//     static ExtendedClientCodecConfigurer create(){
//         return new DefaultExtendedClientCodecConfigurer();
//     }
// 
//     interface ExtendedClientDefaultCodecs extends ClientDefaultCodecs {
//         void httpClientErrorDecoder(HttpClientErrorDecoder clientErrorDecoder);
//         void httpServerErrorDecoder(HttpServerErrorDecoder serverErrorDecoder);
//     }
// 
//     interface ExtendedCustomCodecs extends CustomCodecs{
//         void errorReader(HttpErrorReader errorReader);
//         void errorDecoder(ErrorDecoder errorDecoder);
//     }
// }
// 
// Path: src/main/java/com/webfluxclient/codec/HttpClientErrorDecoder.java
// public class HttpClientErrorDecoder implements ErrorDecoder<HttpClientException> {
//     @Override
//     public boolean canDecode(HttpStatus httpStatus) {
//         return httpStatus.is4xxClientError();
//     }
// 
//     @Override
//     public HttpClientException decode(HttpStatus httpStatus, DataBuffer inputMessage) {
//         return new HttpClientException(httpStatus, DataBuffers.readToString(inputMessage));
//     }
// }
// 
// Path: src/main/java/com/webfluxclient/codec/HttpErrorReader.java
// public interface HttpErrorReader {
// 
//     /**
//      * Whether the given {@link HttpStatus} is supported by this reader.
//      * @param httpStatus received by the client
//      * @return {@code true} if supported, {@code false} otherwise
//      */
//     boolean canRead(HttpStatus httpStatus);
// 
//     /**
//      * Read from the input message and return a error {@link Flux}
//      *
//      * @param inputMessage the message to read from
//      * @return the error {@link Flux} with the decoded exception
//      * */
//     <T> Flux<T> read(ClientHttpResponse inputMessage);
// 
//     /**
//      * Read from the input message and return a error {@link Mono}
//      *
//      * @param inputMessage the message to read from
//      * @return the error {@link Mono} with the decoded exception
//      * */
//     <T> Mono<T> readMono(ClientHttpResponse inputMessage);
// 
// }
// 
// Path: src/main/java/com/webfluxclient/codec/HttpServerErrorDecoder.java
// public class HttpServerErrorDecoder implements ErrorDecoder<HttpServerException> {
//     @Override
//     public boolean canDecode(HttpStatus httpStatus) {
//         return httpStatus.is5xxServerError();
//     }
// 
//     @Override
//     public HttpServerException decode(HttpStatus httpStatus, DataBuffer inputMessage) {
//         return new HttpServerException(httpStatus, DataBuffers.readToString(inputMessage));
//     }
// }
// 
// Path: src/main/java/com/webfluxclient/handler/ReactiveInvocationHandlerFactory.java
// public interface ReactiveInvocationHandlerFactory {
//     InvocationHandler build(
//             ExtendedClientCodecConfigurer codecConfigurer,
//             List<RequestProcessor> requestProcessors,
//             List<ResponseProcessor> responseProcessors,
//             Logger logger,
//             LogLevel logLevel,
//             Class<?> target,
//             URI uri);
// }


// Path: src/test/java/com/webfluxclient/DefaultClientBuilderTest.java
import com.webfluxclient.codec.ErrorDecoder;
import com.webfluxclient.codec.ExtendedClientCodecConfigurer;
import com.webfluxclient.codec.HttpClientErrorDecoder;
import com.webfluxclient.codec.HttpErrorReader;
import com.webfluxclient.codec.HttpServerErrorDecoder;
import com.webfluxclient.handler.ReactiveInvocationHandlerFactory;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.http.HttpStatus;
import java.net.URI;
import java.util.List;
import java.util.Optional;
import java.util.function.Supplier;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyList;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.ArgumentMatchers.same;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;

package com.webfluxclient;




@RunWith(MockitoJUnitRunner.class)
public class DefaultClientBuilderTest {

    @Mock
    private ReactiveInvocationHandlerFactory reactiveInvocationHandlerFactory;