// Path: fluency-fluentd/src/main/java/org/komamitsu/fluency/fluentd/ingester/sender/retry/ExponentialBackOffRetryStrategy.java
// public class ExponentialBackOffRetryStrategy
//         extends RetryStrategy
// {
//     private final Config config;
// 
//     public ExponentialBackOffRetryStrategy()
//     {
//         this(new Config());
//     }
// 
//     public ExponentialBackOffRetryStrategy(Config config)
//     {
//         super(config);
//         config.validateValues();
//         this.config = config;
//     }
// 
//     @Override
//     public int getNextIntervalMillis(int retryCount)
//     {
//         int interval = config.getBaseIntervalMillis() * ((int) Math.pow(2.0, (double) retryCount));
//         if (interval > config.getMaxIntervalMillis()) {
//             return config.getMaxIntervalMillis();
//         }
//         return interval;
//     }
// 
//     public int getBaseIntervalMillis()
//     {
//         return config.getBaseIntervalMillis();
//     }
// 
//     public int getMaxIntervalMillis()
//     {
//         return config.getMaxIntervalMillis();
//     }
// 
//     @Override
//     public String toString()
//     {
//         return "ExponentialBackOffRetryStrategy{" +
//                 "config=" + config +
//                 "} " + super.toString();
//     }
// 
//     public static class Config
//             extends RetryStrategy.Config
//             implements Validatable
//     {
//         @Min(10)
//         private int baseIntervalMillis = 400;
//         @Min(10)
//         private int maxIntervalMillis = 30 * 1000;
// 
//         public int getBaseIntervalMillis()
//         {
//             return baseIntervalMillis;
//         }
// 
//         public void setBaseIntervalMillis(int baseIntervalMillis)
//         {
//             this.baseIntervalMillis = baseIntervalMillis;
//         }
// 
//         public int getMaxIntervalMillis()
//         {
//             return maxIntervalMillis;
//         }
// 
//         public void setMaxIntervalMillis(int maxIntervalMillis)
//         {
//             this.maxIntervalMillis = maxIntervalMillis;
//         }
// 
//         void validateValues()
//         {
//             validate();
//         }
// 
//         @Override
//         public String toString()
//         {
//             return "Config{" +
//                     "baseIntervalMillis=" + baseIntervalMillis +
//                     ", maxIntervalMillis=" + maxIntervalMillis +
//                     "} " + super.toString();
//         }
//     }
// }


import org.junit.jupiter.api.Test;
import org.komamitsu.fluency.fluentd.ingester.sender.retry.ExponentialBackOffRetryStrategy;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.List;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.junit.jupiter.api.Assertions.assertThrows;
/*
 * Copyright 2019 Mitsunori Komatsu (komamitsu)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.komamitsu.fluency.fluentd.ingester.sender;




class RetryableSenderTest
{
    @Test
    void testSend()
            throws IOException
    {
// Path: fluency-fluentd/src/main/java/org/komamitsu/fluency/fluentd/ingester/sender/retry/ExponentialBackOffRetryStrategy.java
// public class ExponentialBackOffRetryStrategy
//         extends RetryStrategy
// {
//     private final Config config;
// 
//     public ExponentialBackOffRetryStrategy()
//     {
//         this(new Config());
//     }
// 
//     public ExponentialBackOffRetryStrategy(Config config)
//     {
//         super(config);
//         config.validateValues();
//         this.config = config;
//     }
// 
//     @Override
//     public int getNextIntervalMillis(int retryCount)
//     {
//         int interval = config.getBaseIntervalMillis() * ((int) Math.pow(2.0, (double) retryCount));
//         if (interval > config.getMaxIntervalMillis()) {
//             return config.getMaxIntervalMillis();
//         }
//         return interval;
//     }
// 
//     public int getBaseIntervalMillis()
//     {
//         return config.getBaseIntervalMillis();
//     }
// 
//     public int getMaxIntervalMillis()
//     {
//         return config.getMaxIntervalMillis();
//     }
// 
//     @Override
//     public String toString()
//     {
//         return "ExponentialBackOffRetryStrategy{" +
//                 "config=" + config +
//                 "} " + super.toString();
//     }
// 
//     public static class Config
//             extends RetryStrategy.Config
//             implements Validatable
//     {
//         @Min(10)
//         private int baseIntervalMillis = 400;
//         @Min(10)
//         private int maxIntervalMillis = 30 * 1000;
// 
//         public int getBaseIntervalMillis()
//         {
//             return baseIntervalMillis;
//         }
// 
//         public void setBaseIntervalMillis(int baseIntervalMillis)
//         {
//             this.baseIntervalMillis = baseIntervalMillis;
//         }
// 
//         public int getMaxIntervalMillis()
//         {
//             return maxIntervalMillis;
//         }
// 
//         public void setMaxIntervalMillis(int maxIntervalMillis)
//         {
//             this.maxIntervalMillis = maxIntervalMillis;
//         }
// 
//         void validateValues()
//         {
//             validate();
//         }
// 
//         @Override
//         public String toString()
//         {
//             return "Config{" +
//                     "baseIntervalMillis=" + baseIntervalMillis +
//                     ", maxIntervalMillis=" + maxIntervalMillis +
//                     "} " + super.toString();
//         }
//     }
// }


// Path: fluency-fluentd/src/test/java/org/komamitsu/fluency/fluentd/ingester/sender/RetryableSenderTest.java
import org.junit.jupiter.api.Test;
import org.komamitsu.fluency.fluentd.ingester.sender.retry.ExponentialBackOffRetryStrategy;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.List;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.junit.jupiter.api.Assertions.assertThrows;

/*
 * Copyright 2019 Mitsunori Komatsu (komamitsu)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.komamitsu.fluency.fluentd.ingester.sender;




class RetryableSenderTest
{
    @Test
    void testSend()
            throws IOException
    {
        ExponentialBackOffRetryStrategy.Config retryStrategyConfig =