// Path: src/test/java/de/javakaffee/kryoserializers/KryoTest.java
// public static <T> T deserialize(final Kryo kryo, final byte[] in, final Class<T> clazz) {
//     final Input input = new Input(in);
//     return kryo.readObject(input, clazz);
// }
// 
// Path: src/test/java/de/javakaffee/kryoserializers/KryoTest.java
// public static byte[] serialize(final Kryo kryo, final Object o) {
//     if ( o == null ) {
//         throw new NullPointerException( "Can't serialize null" );
//     }
// 
//     final Output output = new Output(4096);
//     kryo.writeObject(output, o);
//     output.flush();
//     return output.getBuffer();
// }


import static de.javakaffee.kryoserializers.KryoTest.deserialize;
import static de.javakaffee.kryoserializers.KryoTest.serialize;
import static org.testng.Assert.*;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import com.esotericsoftware.kryo.Kryo;
import com.google.common.collect.HashBasedTable;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableTable;
import com.google.common.collect.Lists;
import com.google.common.collect.Table;
    @Test( enabled = true )
    public void testValues() {
        Table<Integer,Integer,Integer> baseTable = HashBasedTable.create();
        baseTable.put(1, 2, 3);
        baseTable.put(4, 5, 6);
        Table<Integer, Integer, Integer> table = ImmutableTable.copyOf(baseTable);
        final ImmutableList<?> obj = (ImmutableList<?>) table.values();
        final byte[] serialized = serialize( _kryo, obj );
        final ImmutableList<?> deserialized = deserialize(_kryo, serialized, ImmutableList.class);
        assertEquals(deserialized, obj);
    }

    // Kryo#copy tests

    @Test( enabled = true )
    public void testCopyEmpty() {
        final ImmutableList<?> obj = ImmutableList.of();
        final ImmutableList<?> copied = _kryo.copy(obj);
        assertSame(copied, obj);
    }

    @Test( enabled = true )
    public void testCopySingleton() {
        final ImmutableList<?> obj = ImmutableList.of(1);
        final ImmutableList<?> copied = _kryo.copy(obj);
        assertSame(copied, obj);
    }

    @Test( enabled = true )
    public void testCopyRegular() {
// Path: src/test/java/de/javakaffee/kryoserializers/KryoTest.java
// public static <T> T deserialize(final Kryo kryo, final byte[] in, final Class<T> clazz) {
//     final Input input = new Input(in);
//     return kryo.readObject(input, clazz);
// }
// 
// Path: src/test/java/de/javakaffee/kryoserializers/KryoTest.java
// public static byte[] serialize(final Kryo kryo, final Object o) {
//     if ( o == null ) {
//         throw new NullPointerException( "Can't serialize null" );
//     }
// 
//     final Output output = new Output(4096);
//     kryo.writeObject(output, o);
//     output.flush();
//     return output.getBuffer();
// }


// Path: src/test/java/de/javakaffee/kryoserializers/guava/ImmutableListSerializerTest.java
import static de.javakaffee.kryoserializers.KryoTest.deserialize;
import static de.javakaffee.kryoserializers.KryoTest.serialize;
import static org.testng.Assert.*;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import com.esotericsoftware.kryo.Kryo;
import com.google.common.collect.HashBasedTable;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableTable;
import com.google.common.collect.Lists;
import com.google.common.collect.Table;

    @Test( enabled = true )
    public void testValues() {
        Table<Integer,Integer,Integer> baseTable = HashBasedTable.create();
        baseTable.put(1, 2, 3);
        baseTable.put(4, 5, 6);
        Table<Integer, Integer, Integer> table = ImmutableTable.copyOf(baseTable);
        final ImmutableList<?> obj = (ImmutableList<?>) table.values();
        final byte[] serialized = serialize( _kryo, obj );
        final ImmutableList<?> deserialized = deserialize(_kryo, serialized, ImmutableList.class);
        assertEquals(deserialized, obj);
    }

    // Kryo#copy tests

    @Test( enabled = true )
    public void testCopyEmpty() {
        final ImmutableList<?> obj = ImmutableList.of();
        final ImmutableList<?> copied = _kryo.copy(obj);
        assertSame(copied, obj);
    }

    @Test( enabled = true )
    public void testCopySingleton() {
        final ImmutableList<?> obj = ImmutableList.of(1);
        final ImmutableList<?> copied = _kryo.copy(obj);
        assertSame(copied, obj);
    }

    @Test( enabled = true )
    public void testCopyRegular() {
        final ImmutableList<?> obj = ImmutableList.of(1, 2, 3);