in chill-scala/src/main/scala/com/twitter/chill/JavaIterableWrapperSerializer.scala [17:24]
override def write(kryo: Kryo, out: Output, obj: JIterable[_]): Unit =
// If the object is the wrapper, simply serialize the underlying Scala Iterable object.
// Otherwise, serialize the object itself.
if (obj.getClass == wrapperClass && underlyingMethodOpt.isDefined) {
kryo.writeClassAndObject(out, underlyingMethodOpt.get.invoke(obj))
} else {
kryo.writeClassAndObject(out, obj)
}