package test.collections import kotlin.test.* import java.util.* import org.junit.Test as test class MutableCollectionTest { test fun fromIterable() { val data: Iterable = listOf("foo", "bar") val collection = ArrayList() collection.addAll(data) assertEquals(data, collection) } test fun fromSequence() { val list = listOf("foo", "bar") val collection = ArrayList() collection.addAll(list.asSequence()) assertEquals(list, collection) } }