// Path: fluency-core/src/test/java/org/komamitsu/fluency/JsonRecordFormatter.java
// public class JsonRecordFormatter
//         extends AbstractRecordFormatter
// {
//     private ObjectMapper objectMapper = new ObjectMapper();
// 
//     public JsonRecordFormatter()
//     {
//         super(new Config());
//     }
// 
//     @Override
//     public byte[] format(String tag, Object timestamp, Map<String, Object> data)
//     {
//         try {
//             return objectMapper.writeValueAsBytes(data);
//         }
//         catch (JsonProcessingException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     @Override
//     public byte[] formatFromMessagePack(String tag, Object timestamp, byte[] mapValue, int offset, int len)
//     {
//         throw new RuntimeException("Shouldn't be called");
//     }
// 
//     @Override
//     public byte[] formatFromMessagePack(String tag, Object timestamp, ByteBuffer mapValue)
//     {
//         throw new RuntimeException("Shouldn't be called");
//     }
// 
//     @Override
//     public String formatName()
//     {
//         return "json";
//     }
// }
// 
// Path: fluency-core/src/main/java/org/komamitsu/fluency/ingester/Ingester.java
// public interface Ingester
//         extends Closeable
// {
//     void ingest(String tag, ByteBuffer dataBuffer)
//             throws IOException;
// 
//     Sender getSender();
// }
// 
// Path: fluency-core/src/main/java/org/komamitsu/fluency/recordformat/RecordFormatter.java
// public interface RecordFormatter
// {
//     byte[] format(String tag, Object timestamp, Map<String, Object> data);
// 
//     byte[] formatFromMessagePack(String tag, Object timestamp, byte[] mapValue, int offset, int len);
// 
//     byte[] formatFromMessagePack(String tag, Object timestamp, ByteBuffer mapValue);
// 
//     String formatName();
// 
//     class Config
//     {
//         private List<Module> jacksonModules = Collections.emptyList();
// 
//         public List<Module> getJacksonModules()
//         {
//             return jacksonModules;
//         }
// 
//         public void setJacksonModules(List<Module> jacksonModules)
//         {
//             this.jacksonModules = jacksonModules;
//         }
//     }
// }
// 
// Path: fluency-core/src/main/java/org/komamitsu/fluency/util/Tuple.java
// public class Tuple<F, S>
// {
//     private final F first;
//     private final S second;
// 
//     public Tuple(F first, S second)
//     {
//         this.first = first;
//         this.second = second;
//     }
// 
//     public F getFirst()
//     {
//         return first;
//     }
// 
//     public S getSecond()
//     {
//         return second;
//     }
// }


import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.komamitsu.fluency.JsonRecordFormatter;
import org.komamitsu.fluency.ingester.Ingester;
import org.komamitsu.fluency.recordformat.RecordFormatter;
import org.komamitsu.fluency.util.Tuple;
import org.mockito.ArgumentCaptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.number.OrderingComparison.greaterThan;
import static org.hamcrest.number.OrderingComparison.lessThan;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
/*
 * Copyright 2018 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.buffer;




class BufferTest
{
    private static final Logger LOG = LoggerFactory.getLogger(BufferTest.class);
    private Ingester ingester;
// Path: fluency-core/src/test/java/org/komamitsu/fluency/JsonRecordFormatter.java
// public class JsonRecordFormatter
//         extends AbstractRecordFormatter
// {
//     private ObjectMapper objectMapper = new ObjectMapper();
// 
//     public JsonRecordFormatter()
//     {
//         super(new Config());
//     }
// 
//     @Override
//     public byte[] format(String tag, Object timestamp, Map<String, Object> data)
//     {
//         try {
//             return objectMapper.writeValueAsBytes(data);
//         }
//         catch (JsonProcessingException e) {
//             throw new RuntimeException(e);
//         }
//     }
// 
//     @Override
//     public byte[] formatFromMessagePack(String tag, Object timestamp, byte[] mapValue, int offset, int len)
//     {
//         throw new RuntimeException("Shouldn't be called");
//     }
// 
//     @Override
//     public byte[] formatFromMessagePack(String tag, Object timestamp, ByteBuffer mapValue)
//     {
//         throw new RuntimeException("Shouldn't be called");
//     }
// 
//     @Override
//     public String formatName()
//     {
//         return "json";
//     }
// }
// 
// Path: fluency-core/src/main/java/org/komamitsu/fluency/ingester/Ingester.java
// public interface Ingester
//         extends Closeable
// {
//     void ingest(String tag, ByteBuffer dataBuffer)
//             throws IOException;
// 
//     Sender getSender();
// }
// 
// Path: fluency-core/src/main/java/org/komamitsu/fluency/recordformat/RecordFormatter.java
// public interface RecordFormatter
// {
//     byte[] format(String tag, Object timestamp, Map<String, Object> data);
// 
//     byte[] formatFromMessagePack(String tag, Object timestamp, byte[] mapValue, int offset, int len);
// 
//     byte[] formatFromMessagePack(String tag, Object timestamp, ByteBuffer mapValue);
// 
//     String formatName();
// 
//     class Config
//     {
//         private List<Module> jacksonModules = Collections.emptyList();
// 
//         public List<Module> getJacksonModules()
//         {
//             return jacksonModules;
//         }
// 
//         public void setJacksonModules(List<Module> jacksonModules)
//         {
//             this.jacksonModules = jacksonModules;
//         }
//     }
// }
// 
// Path: fluency-core/src/main/java/org/komamitsu/fluency/util/Tuple.java
// public class Tuple<F, S>
// {
//     private final F first;
//     private final S second;
// 
//     public Tuple(F first, S second)
//     {
//         this.first = first;
//         this.second = second;
//     }
// 
//     public F getFirst()
//     {
//         return first;
//     }
// 
//     public S getSecond()
//     {
//         return second;
//     }
// }


// Path: fluency-core/src/test/java/org/komamitsu/fluency/buffer/BufferTest.java
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.komamitsu.fluency.JsonRecordFormatter;
import org.komamitsu.fluency.ingester.Ingester;
import org.komamitsu.fluency.recordformat.RecordFormatter;
import org.komamitsu.fluency.util.Tuple;
import org.mockito.ArgumentCaptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.number.OrderingComparison.greaterThan;
import static org.hamcrest.number.OrderingComparison.lessThan;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

/*
 * Copyright 2018 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.buffer;




class BufferTest
{
    private static final Logger LOG = LoggerFactory.getLogger(BufferTest.class);
    private Ingester ingester;
    private RecordFormatter recordFormatter;