import Ġkotlin . test .* Ċ import Ġkotlin . comp arisons .* Ċ Ċ fun Ġbox () Ġ{ ĊĠĠĠ Ġval Ġcoll Ġ= ĠlistOf (" foo ", Ġ" bar ", Ġ" abc ") ĊĊĠĠĠ ĠassertEquals ( emptyList < String >(), Ġcoll . take Last ( 0 )) ĊĠĠĠ ĠassertEquals ( listOf (" abc "), Ġcoll . take Last ( 1 )) ĊĠĠĠ ĠassertEquals ( listOf (" bar ", Ġ" abc "), Ġcoll . take Last ( 2 )) ĊĠĠĠ ĠassertEquals ( coll , Ġcoll . take Last ( coll . size )) ĊĠĠĠ ĠassertEquals ( coll , Ġcoll . take Last ( coll . size Ġ+ Ġ 1 )) ĊĊĠĠĠ Ġassert Fails Ġ{ Ġcoll . take Last (- 1 ) Ġ} Ċ } Ċ