@SuppressWarnings({ "unchecked", "rawtypes" })
public void testCustomLists() throws Exception
{
ObjectMapper mapper = new ObjectMapper();
CustomSerializerFactory sf = new CustomSerializerFactory();
JsonSerializer<?> ser = new CollectionSerializer(null, false, null, null, null);
final JsonSerializer<Object> collectionSerializer = (JsonSerializer<Object>) ser;
sf.addGenericMapping(Collection.class, new JsonSerializer<Collection>() {
@Override
public void serialize(Collection value, JsonGenerator jgen, SerializerProvider provider)