code: public static Collection marshalCollection(Class cassandraTypeClazz, Collection result, Class clazz, Class resultTypeClass)
      {
          Collection mappedCollection = result;
  
          if (cassandraTypeClazz.isAssignableFrom(BytesType.class))
          {
              mappedCollection = (Collection) PropertyAccessorHelper.getObject(resultTypeClass);
              for (Object value : result)
              {
                  byte[] valueAsBytes = new byte[((ByteBuffer) value).remaining()];
                  ((ByteBuffer) value).get(valueAsBytes);
                   mappedCollection.add(PropertyAccessorHelper.getObject(clazz, valueAsBytes));
              }
          }
          return mappedCollection;
      }
docs: Marshal collection.
  
  @param cassandraTypeClazz
  the cassandra type clazz
  @param result
  the result
  @param clazz
  the clazz
  @return the collection