package com.netflix.astyanax.serializers;

import java.nio.ByteBuffer;

import junit.framework.Assert;

import org.junit.Test;

public class SerializerPackageImplTest {
    @Test
    public void test() {
        SerializerPackageImpl serializers = new SerializerPackageImpl();
        try {
            serializers.setColumnType("CompositeType(UTF8Type, LongType)");
        } catch (UnknownComparatorException e) {
            e.printStackTrace();
            Assert.fail();
        }

        String input = "abc:123";
        ByteBuffer buffer = serializers.columnAsByteBuffer(input);
        String str = serializers.columnAsString(buffer);
        Assert.assertEquals(input, str);
    }
}

@@ -684,11 +684,699 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void testSetCompositeKeyType()%0A    %7B%0A        SerializerPackageImpl serializers = new SerializerPackageImpl();%0A%0A        try %7B%0A            serializers.setKeyType( %22CompositeType(UTF8Type, LongType)%22 );%0A        %7D%0A        catch ( UnknownComparatorException e ) %7B%0A            e.printStackTrace();%0A            Assert.fail();%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void testSetStandardKeyType()%0A    %7B%0A        SerializerPackageImpl serializers = new SerializerPackageImpl();%0A%0A        try %7B%0A            serializers.setKeyType( %22LongType%22 );%0A        %7D%0A        catch ( UnknownComparatorException e ) %7B%0A            e.printStackTrace();%0A            Assert.fail();%0A        %7D%0A    %7D
 %0A%7D%0A

Add unit tests for set key type of SerializerPackageImpl