// Path: hibernate4-memcached-core/src/main/java/kr/pe/kwonnam/hibernate4memcached/util/OverridableReadOnlyProperties.java
// public interface OverridableReadOnlyProperties {
//     String getProperty(String key);
// 
//     String getProperty(String key, String defaultValue);
// 
//     String getRequiredProperty(String key);
// }
// 
// Path: hibernate4-memcached-core/src/main/java/kr/pe/kwonnam/hibernate4memcached/util/OverridableReadOnlyPropertiesImpl.java
// public class OverridableReadOnlyPropertiesImpl implements OverridableReadOnlyProperties {
// 
//     private List<Properties> propertieses;
// 
//     public OverridableReadOnlyPropertiesImpl(Properties... propertieses) {
//         this(Arrays.asList(propertieses));
//     }
// 
//     public OverridableReadOnlyPropertiesImpl(List<Properties> propertieses) {
//         if (propertieses == null || propertieses.size() == 0) {
//             throw new IllegalArgumentException("propertieses  can not be null.");
//         }
// 
//         if (propertieses.contains(null)) {
//             throw new IllegalArgumentException("propertieses can not contain null properties");
//         }
// 
//         this.propertieses = propertieses;
//     }
// 
//     @Override
//     public String getProperty(String key) {
//         return getProperty(key, null);
//     }
// 
//     @Override
//     public String getProperty(String key, String defaultValue) {
//         int size = propertieses.size();
//         for (int i = size - 1; i >= 0; i--) {
//             Properties properties = propertieses.get(i);
// 
//             String value = properties.getProperty(key);
//             if (value != null) {
//                 return value;
//             }
//         }
//         return defaultValue;
//     }
// 
//     @Override
//     public String getRequiredProperty(String key) {
//         String value = getProperty(key);
//         if (value == null) {
//             throw new IllegalStateException(key + " property is required!");
//         }
//         return value;
//     }
// }


import kr.pe.kwonnam.hibernate4memcached.util.OverridableReadOnlyProperties;
import kr.pe.kwonnam.hibernate4memcached.util.OverridableReadOnlyPropertiesImpl;
import net.spy.memcached.CachedData;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.nio.charset.Charset;
import java.util.Properties;
import static org.fest.assertions.api.Assertions.assertThat;
package kr.pe.kwonnam.hibernate4memcached.spymemcached;




public class KryoTranscoderTest {

    private Logger log = LoggerFactory.getLogger(KryoTranscoderTest.class);

    @Rule
    public ExpectedException expectedException = ExpectedException.none();

    private KryoTranscoder kryoTranscoder;


    private void givenKryoTranscoder(int compressionThreadHold) {
        Properties properties = new Properties();
        properties.setProperty(KryoTranscoder.COMPRESSION_THREASHOLD_PROPERTY_KEY, String.valueOf(compressionThreadHold));

        kryoTranscoder = new KryoTranscoder();
// Path: hibernate4-memcached-core/src/main/java/kr/pe/kwonnam/hibernate4memcached/util/OverridableReadOnlyProperties.java
// public interface OverridableReadOnlyProperties {
//     String getProperty(String key);
// 
//     String getProperty(String key, String defaultValue);
// 
//     String getRequiredProperty(String key);
// }
// 
// Path: hibernate4-memcached-core/src/main/java/kr/pe/kwonnam/hibernate4memcached/util/OverridableReadOnlyPropertiesImpl.java
// public class OverridableReadOnlyPropertiesImpl implements OverridableReadOnlyProperties {
// 
//     private List<Properties> propertieses;
// 
//     public OverridableReadOnlyPropertiesImpl(Properties... propertieses) {
//         this(Arrays.asList(propertieses));
//     }
// 
//     public OverridableReadOnlyPropertiesImpl(List<Properties> propertieses) {
//         if (propertieses == null || propertieses.size() == 0) {
//             throw new IllegalArgumentException("propertieses  can not be null.");
//         }
// 
//         if (propertieses.contains(null)) {
//             throw new IllegalArgumentException("propertieses can not contain null properties");
//         }
// 
//         this.propertieses = propertieses;
//     }
// 
//     @Override
//     public String getProperty(String key) {
//         return getProperty(key, null);
//     }
// 
//     @Override
//     public String getProperty(String key, String defaultValue) {
//         int size = propertieses.size();
//         for (int i = size - 1; i >= 0; i--) {
//             Properties properties = propertieses.get(i);
// 
//             String value = properties.getProperty(key);
//             if (value != null) {
//                 return value;
//             }
//         }
//         return defaultValue;
//     }
// 
//     @Override
//     public String getRequiredProperty(String key) {
//         String value = getProperty(key);
//         if (value == null) {
//             throw new IllegalStateException(key + " property is required!");
//         }
//         return value;
//     }
// }


// Path: hibernate4-memcached-spymemcached-adapter/src/test/java/kr/pe/kwonnam/hibernate4memcached/spymemcached/KryoTranscoderTest.java
import kr.pe.kwonnam.hibernate4memcached.util.OverridableReadOnlyProperties;
import kr.pe.kwonnam.hibernate4memcached.util.OverridableReadOnlyPropertiesImpl;
import net.spy.memcached.CachedData;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.nio.charset.Charset;
import java.util.Properties;
import static org.fest.assertions.api.Assertions.assertThat;

package kr.pe.kwonnam.hibernate4memcached.spymemcached;




public class KryoTranscoderTest {

    private Logger log = LoggerFactory.getLogger(KryoTranscoderTest.class);

    @Rule
    public ExpectedException expectedException = ExpectedException.none();

    private KryoTranscoder kryoTranscoder;


    private void givenKryoTranscoder(int compressionThreadHold) {
        Properties properties = new Properties();
        properties.setProperty(KryoTranscoder.COMPRESSION_THREASHOLD_PROPERTY_KEY, String.valueOf(compressionThreadHold));

        kryoTranscoder = new KryoTranscoder();
        kryoTranscoder.init(new OverridableReadOnlyPropertiesImpl(properties));