// Path: cacheio-core/src/main/java/com/mobilejazz/cacheio/mappers/ValueMapper.java
// public interface ValueMapper {
// 
//   void write(Object value, OutputStream out) throws SerializerException;
// 
//   <T> T read(Class<T> type, InputStream in) throws SerializerException;
// }
// 
// Path: cacheio-core/src/main/java/com/mobilejazz/cacheio/exceptions/SerializerException.java
// public class SerializerException extends CacheIOException {
// 
//   public SerializerException() {
//   }
// 
//   public SerializerException(String detailMessage) {
//     super(detailMessage);
//   }
// 
//   public SerializerException(String detailMessage, Throwable throwable) {
//     super(detailMessage, throwable);
//   }
// 
//   public SerializerException(Throwable throwable) {
//     super(throwable);
//   }
// }


import com.mobilejazz.cacheio.mappers.ValueMapper;
import com.mobilejazz.cacheio.exceptions.SerializerException;
import java.io.*;
import java.util.*;
import java.util.concurrent.*;
/*
 * Copyright (C) 2016 Mobile Jazz
 *
 *  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 com.mobilejazz.cacheio.caches;



public class TestValueMapper implements ValueMapper {

  private final Random random = new Random();
  private final Map<SerializedValue, Object> bytesToValue = new ConcurrentHashMap<>();

// Path: cacheio-core/src/main/java/com/mobilejazz/cacheio/mappers/ValueMapper.java
// public interface ValueMapper {
// 
//   void write(Object value, OutputStream out) throws SerializerException;
// 
//   <T> T read(Class<T> type, InputStream in) throws SerializerException;
// }
// 
// Path: cacheio-core/src/main/java/com/mobilejazz/cacheio/exceptions/SerializerException.java
// public class SerializerException extends CacheIOException {
// 
//   public SerializerException() {
//   }
// 
//   public SerializerException(String detailMessage) {
//     super(detailMessage);
//   }
// 
//   public SerializerException(String detailMessage, Throwable throwable) {
//     super(detailMessage, throwable);
//   }
// 
//   public SerializerException(Throwable throwable) {
//     super(throwable);
//   }
// }


// Path: cacheio-core/src/test/java/com/mobilejazz/cacheio/caches/TestValueMapper.java
import com.mobilejazz.cacheio.mappers.ValueMapper;
import com.mobilejazz.cacheio.exceptions.SerializerException;
import java.io.*;
import java.util.*;
import java.util.concurrent.*;

/*
 * Copyright (C) 2016 Mobile Jazz
 *
 *  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 com.mobilejazz.cacheio.caches;



public class TestValueMapper implements ValueMapper {

  private final Random random = new Random();
  private final Map<SerializedValue, Object> bytesToValue = new ConcurrentHashMap<>();

  @Override public void write(Object value, OutputStream out) throws SerializerException {