keyspace.prepareQuery(CF_SERIALIZER1)
.withCql("select * from astyanaxunittests.serializer1")
.execute();
SerializerPackage serializer = keyspace.getSerializerPackage("Serializer1", false);
System.out.println("");
System.out.println("KeySerializer: " + serializer.getKeySerializer());
System.out.println("ColumnNameSerializer: " + serializer.getColumnNameSerializer());
System.out.println("ColumnSerializer: " + serializer.getColumnSerializer());
System.out.println("DefaultValueSerializer: " + serializer.getDefaultValueSerializer());
System.out.println("ValueSerializer: " + serializer.getValueSerializer());
String ss1 = "ss1";
ByteBuffer bb1 = StringSerializer.get().fromString(ss1);
String ss1Result = serializer.getKeySerializer().getString(bb1);
System.out.println("ss1Result: " + ss1Result);
Assert.assertEquals(ss1, ss1Result);
SpecificCompositeSerializer comp = (SpecificCompositeSerializer) serializer.getColumnNameSerializer();
System.out.println(comp.getComparators().toString());
Composite dc = new Composite(ss1);
List<AbstractType<?>> types = new ArrayList<AbstractType<?>>();
types.add(UTF8Type.instance);
CompositeType c1 = CompositeType.getInstance(types);
SpecificCompositeSerializer ccSerializer = new SpecificCompositeSerializer(c1);
ByteBuffer bb2 = ccSerializer.toByteBuffer(dc);
Composite c2 = (Composite) serializer.getColumnNameSerializer().fromByteBuffer(bb2);
ss1Result = (String) c2.get(0);
Assert.assertEquals(ss1, ss1Result);
}