package Ġnl . jh vh . s udoku . util Ċ Ċ /* ĠCopyright Ġ 2 0 2 0 ĠJan - H end rik Ġvan ĠHe us den ĊĊĠĠ ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); ĊĠĠ Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . ĊĠĠ ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat ĊĊĠĠĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 ĊĊĠĠ ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware ĊĠĠ Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , ĊĠĠ ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . ĊĠĠ ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand ĊĠĠ Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġkotlin . test . assert Fails With Ċ Ċ class ĠUtil Test Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġincrement From Zero () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( increment From Zero ( 5 )). isEqualTo ( listOf ( 0 , Ġ 1 , Ġ 2 , Ġ 3 , Ġ 4 )) ĊĠĠĠĠĠĠĠ ĠassertThat ( increment From Zero ( 0 )). isEmpty () ĊĠĠĠĠĠĠĠ ĠassertThat ( increment From Zero ( 1 )). isEqualTo ( listOf ( 0 )) ĊĠĠĠĠĠĠĠ Ġassert Fails With < IllegalArgumentException > Ġ{ Ġincrement From Zero (- 1 ) Ġ} ĊĠĠĠĠĠĠĠ Ġassert Fails With < IllegalArgumentException > Ġ{ Ġincrement From Zero (- 1 0 ) Ġ} ĊĠĠĠĠĠĠĠ ĠassertThat ( increment From Zero ( 5 0 0 )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. startsWith ( 0 ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. endsWith ( 4 9 9 ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. has Size ( 5 0 0 ) ĊĊĠĠĠĠĠĠĠ Ġval Ġincrement From Zero _ 5 Ġ= Ġincrement From Zero ( 5 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( increment From Zero _ 5 Ġis ĠMutable List ). isTrue () ĊĠĠĠĠĠĠĠ Ġval Ġwould Be Mutable List Ġ= Ġincrement From Zero _ 5 Ġas ĠMutable List ĊĠĠĠĠĠĠĠ Ġ// Ġalthough Ġit 's Ġtype Ġsays Ġit 's Ġmutable , Ġyou Ġcan Ġnot Ġreally Ġmodify Ġit : ĊĠĠĠĠĠĠĠ Ġassert Fails With < Unsupported OperationException > Ġ{ Ġwould Be Mutable List . add ( 1 4 ) Ġ} ĊĠĠĠ Ġ} Ċ Ċ } Ċ