// 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 com.google.common.collect.Lists;
import com.esotericsoftware.kryo.Kryo;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import static de.javakaffee.kryoserializers.KryoTest.deserialize;
import static de.javakaffee.kryoserializers.KryoTest.serialize;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
    }

    @Test( enabled = true )
    public void testEmptyReverseList() {
        testEmpty(Lists.reverse(Lists.newLinkedList()));
    }

    @Test( enabled = true )
    public void testEmptyRandomAccessReverseList() {
        testEmpty(Lists.reverse(Lists.newArrayList()));
    }

    private void testEmpty(final List<?> reverseList) {
        final byte[] serialized = serialize( _kryo, reverseList );
        final List<?> deserialized = deserialize(_kryo, serialized, reverseList.getClass());
        assertEquals(deserialized.getClass(), reverseList.getClass());
        assertTrue(deserialized.isEmpty());
        assertEquals(deserialized.size(), reverseList.size());
    }

    @Test( enabled = true )
    public void testSingletonReverseList() {
        testSingleton(Lists.reverse(Lists.newLinkedList(Collections.singleton(3))));
    }

    @Test( enabled = true )
    public void testSingletonRandomAccessReverseList() {
        testSingleton(Lists.reverse(Lists.newArrayList(Collections.singleton(3))));
    }

// 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/ReverseListSerializerTest.java
import com.google.common.collect.Lists;
import com.esotericsoftware.kryo.Kryo;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import static de.javakaffee.kryoserializers.KryoTest.deserialize;
import static de.javakaffee.kryoserializers.KryoTest.serialize;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;

    }

    @Test( enabled = true )
    public void testEmptyReverseList() {
        testEmpty(Lists.reverse(Lists.newLinkedList()));
    }

    @Test( enabled = true )
    public void testEmptyRandomAccessReverseList() {
        testEmpty(Lists.reverse(Lists.newArrayList()));
    }

    private void testEmpty(final List<?> reverseList) {
        final byte[] serialized = serialize( _kryo, reverseList );
        final List<?> deserialized = deserialize(_kryo, serialized, reverseList.getClass());
        assertEquals(deserialized.getClass(), reverseList.getClass());
        assertTrue(deserialized.isEmpty());
        assertEquals(deserialized.size(), reverseList.size());
    }

    @Test( enabled = true )
    public void testSingletonReverseList() {
        testSingleton(Lists.reverse(Lists.newLinkedList(Collections.singleton(3))));
    }

    @Test( enabled = true )
    public void testSingletonRandomAccessReverseList() {
        testSingleton(Lists.reverse(Lists.newArrayList(Collections.singleton(3))));
    }

    private void testSingleton(final List<?> reverseList) {