package Ġmock . template . method receiver Ċ Ċ import Ġkotlin . Any Ċ import Ġkotlin . Boolean Ċ import Ġkotlin . Comparable Ċ import Ġkotlin . Int Ċ import Ġkotlin . Suppress Ċ import Ġkotlin . Unit Ċ import Ġkotlin . collections . List Ċ import Ġtech . ant ib y tes . k mock . K Mock Contract Ċ import Ġtech . ant ib y tes . k mock . K Mock Contract . Collector Ċ import Ġtech . ant ib y tes . k mock . proxy . No op Collector Ċ import Ġtech . ant ib y tes . k mock . proxy . Proxy Factory Ċ Ċ internal Ġclass ĠPlatform Mock < L >( ĊĠĠĠ Ġcollector : ĠK Mock Contract . Collector Ġ= ĠNo op Collector , ĊĠĠĠ Ġ@ Suppress (" UNUSED _ PARAMETER ") ĊĠĠĠ ĠspyOn : ĠPlatform < L >? Ġ= Ġnull , ĊĠĠĠ Ġfreeze : ĠBoolean Ġ= Ġtrue , ĊĠĠĠ Ġ@ Suppress (" unused ") ĊĠĠĠ Ġprivate Ġval Ġrelax Unit Fun : ĠBoolean Ġ= Ġfalse , ĊĠĠĠ Ġ@ Suppress (" unused ") ĊĠĠĠ Ġprivate Ġval Ġrelax ed : ĠBoolean Ġ= Ġfalse , Ċ ) Ġ: ĠPlatform < L > Ġ{ ĊĠĠĠ Ġpublic Ġval Ġ_ equals Receiver : ĊĠĠĠĠĠĠĠ ĠK Mock Contract . Sync Fun Proxy < Int , Ġ( mock . template . method receiver . Something ) Ġ-> Ġkotlin . Int > Ġ= ĊĠĠĠĠĠĠĠ ĠProxy Factory . create Sync Fun Proxy (" mock . template . method receiver . Platform Mock #_ equals Receiver ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector Ġ= Ġcollector , Ġfreeze Ġ= Ġfreeze ) ĊĊĠĠĠ Ġpublic Ġval Ġ_ do Something Receiver : ĊĠĠĠĠĠĠĠ ĠK Mock Contract . Sync Fun Proxy < Int , Ġ( mock . template . method receiver . Something ) Ġ-> Ġkotlin . Int > Ġ= ĊĠĠĠĠĠĠĠ ĠProxy Factory . create Sync Fun Proxy (" mock . template . method receiver . Platform Mock #_ do Something Receiver ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector Ġ= Ġcollector , Ġfreeze Ġ= Ġfreeze ) ĊĊĠĠĠ Ġpublic Ġval Ġ_ do Something Else Receiver With Something Else : ĊĠĠĠĠĠĠĠ ĠK Mock Contract . Sync Fun Proxy < List < Any >, Ġ( mock . template . method receiver . Something Else < kotlin . Any >) Ġ-> ĊĠĠĠĠĠĠĠ Ġkotlin . collections . List < kotlin . Any >> Ġ= ĊĠĠĠĠĠĠĠ ĠProxy Factory . create Sync Fun Proxy (" mock . template . method receiver . Platform Mock #_ do Something Else Receiver With Something Else ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector Ġ= Ġcollector , Ġfreeze Ġ= Ġfreeze ) ĊĊĠĠĠ Ġpublic Ġval Ġ_ do Something Else Receiver With ZT Any : ĠK Mock Contract . Sync Fun Proxy < L , Ġ( kotlin . Any ?) Ġ-> ĠL > Ġ= ĊĠĠĠĠĠĠĠ ĠProxy Factory . create Sync Fun Proxy (" mock . template . method receiver . Platform Mock #_ do Something Else Receiver With ZT Any ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector Ġ= Ġcollector , Ġfreeze Ġ= Ġfreeze ) ĊĊĠĠĠ Ġpublic Ġval Ġ_ do Something Else : ĊĠĠĠĠĠĠĠ ĠK Mock Contract . Sync Fun Proxy < Unit , Ġ( mock . template . method receiver . Something Else < kotlin . Any >) Ġ-> ĊĠĠĠĠĠĠĠ Ġkotlin . Unit > Ġ= ĊĠĠĠĠĠĠĠ ĠProxy Factory . create Sync Fun Proxy (" mock . template . method receiver . Platform Mock #_ do Something Else ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector Ġ= Ġcollector , Ġfreeze Ġ= Ġfreeze ) ĊĊĠĠĠ Ġpublic Ġval Ġ_ mut abor Receiver : ĊĠĠĠĠĠĠĠ ĠK Mock Contract . Sync Fun Proxy < Int , Ġ( mock . template . method receiver . Platform <* >) Ġ-> Ġkotlin . Int > Ġ= ĊĠĠĠĠĠĠĠ ĠProxy Factory . create Sync Fun Proxy (" mock . template . method receiver . Platform Mock #_ mut abor Receiver ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector Ġ= Ġcollector , Ġfreeze Ġ= Ġfreeze ) ĊĊĠĠĠ Ġpublic Ġval Ġ_ mut abor : ĊĠĠĠĠĠĠĠ ĠK Mock Contract . Sync Fun Proxy < Unit , Ġ( mock . template . method receiver . Platform <* >) Ġ-> Ġkotlin . Unit > Ġ= ĊĠĠĠĠĠĠĠ ĠProxy Factory . create Sync Fun Proxy (" mock . template . method receiver . Platform Mock #_ mut abor ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector Ġ= Ġcollector , Ġfreeze Ġ= Ġfreeze ) ĊĊĠĠĠ Ġpublic Ġval Ġ_ do Nothing Receiver With TS ome thing Comparable : ĊĠĠĠĠĠĠĠ ĠK Mock Contract . Sync Fun Proxy < Unit , Ġ( kotlin . Any ) Ġ-> Ġkotlin . Unit > Ġ= ĊĠĠĠĠĠĠĠ ĠProxy Factory . create Sync Fun Proxy (" mock . template . method receiver . Platform Mock #_ do Nothing Receiver With TS ome thing Comparable ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector Ġ= Ġcollector , Ġfreeze Ġ= Ġfreeze ) ĊĊĠĠĠ Ġpublic Ġval Ġ_ do Nothing Receiver With T Any : ĠK Mock Contract . Sync Fun Proxy < Unit , Ġ( kotlin . Any ) Ġ-> ĊĠĠĠ Ġkotlin . Unit > Ġ= ĊĠĠĠĠĠĠĠ ĠProxy Factory . create Sync Fun Proxy (" mock . template . method receiver . Platform Mock #_ do Nothing Receiver With T Any ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector Ġ= Ġcollector , Ġfreeze Ġ= Ġfreeze ) ĊĊĠĠĠ Ġpublic Ġval Ġ_ do Nothing Else Receiver : ĠK Mock Contract . Sync Fun Proxy < Unit , Ġ( kotlin . Any , Ġkotlin . Any ) Ġ-> ĊĠĠĠ Ġkotlin . Unit > Ġ= ĊĠĠĠĠĠĠĠ ĠProxy Factory . create Sync Fun Proxy (" mock . template . method receiver . Platform Mock #_ do Nothing Else Receiver ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector Ġ= Ġcollector , Ġfreeze Ġ= Ġfreeze ) ĊĊĠĠĠ Ġpublic Ġval Ġ_ do Nothing Else : ĠK Mock Contract . Sync Fun Proxy < Any , Ġ( kotlin . Any ) Ġ-> Ġkotlin . Any > Ġ= ĊĠĠĠĠĠĠĠ ĠProxy Factory . create Sync Fun Proxy (" mock . template . method receiver . Platform Mock #_ do Nothing Else ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector Ġ= Ġcollector , Ġfreeze Ġ= Ġfreeze ) ĊĊĠĠĠ Ġpublic Ġval Ġ_ do Inside Receiver : ĊĠĠĠĠĠĠĠ ĠK Mock Contract . Sync Fun Proxy < Int , Ġ( mock . template . method receiver . Anything Else . Something Inside ) Ġ-> ĊĠĠĠĠĠĠĠ Ġkotlin . Int > Ġ= ĊĠĠĠĠĠĠĠ ĠProxy Factory . create Sync Fun Proxy (" mock . template . method receiver . Platform Mock #_ do Inside Receiver ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcollector Ġ= Ġcollector , Ġfreeze Ġ= Ġfreeze ) ĊĊĠĠĠ Ġpublic Ġval Ġ_ i Do : ĠK Mock Contract . Sync Fun Proxy < Unit , Ġ() Ġ-> Ġkotlin . Unit > Ġ= ĊĠĠĠĠĠĠĠ ĠProxy Factory . create Sync Fun Proxy (" mock . template . method receiver . Platform Mock #_ i Do ", Ġcollector Ġ= ĊĠĠĠĠĠĠĠ Ġcollector , Ġfreeze Ġ= Ġfreeze ) ĊĊĠĠĠ Ġpublic Ġoverride Ġfun ĠSomething . equals (): ĠInt Ġ= Ġ_ equals Receiver . invoke ( this @ equals ,) ĊĊĠĠĠ Ġpublic Ġoverride Ġfun ĠSomething . do Something (): ĠInt Ġ= Ġ_ do Something Receiver . invoke ( this @ do Something ,) ĊĊĠĠĠ Ġpublic Ġoverride Ġfun ĠSomething Else < Any >. do Something Else (): ĠList < Any > Ġ= ĊĠĠĠĠĠĠĠ Ġ_ do Something Else Receiver With Something Else . invoke ( this @ do Something Else ,) ĊĊĠĠĠ Ġpublic Ġoverride Ġfun Ġ< T > ĠT . do Something Else (): ĠL Ġ= ĊĠĠĠĠĠĠĠ Ġ_ do Something Else Receiver With ZT Any . invoke ( this @ do Something Else ,) ĊĊĠĠĠ Ġpublic Ġoverride Ġfun Ġdo Something Else ( x : ĠSomething Else < Any >): ĠUnit Ġ= Ġ_ do Something Else . invoke ( x ) Ġ{ ĊĠĠĠĠĠĠĠ Ġuse Unit Fun Rel ax er If ( relax Unit Fun Ġ|| Ġrelax ed ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġpublic Ġoverride Ġfun ĠPlatform <* >. mut abor (): ĠInt Ġ= Ġ_ mut abor Receiver . invoke ( this @ mut abor ,) ĊĊĠĠĠ Ġpublic Ġoverride Ġfun Ġmut abor ( x : ĠPlatform < *> ): ĠUnit Ġ= Ġ_ mut abor . invoke ( x ) Ġ{ ĊĠĠĠĠĠĠĠ Ġuse Unit Fun Rel ax er If ( relax Unit Fun Ġ|| Ġrelax ed ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġpublic Ġoverride Ġfun Ġ< T > ĠT . do Nothing (): ĠUnit Ġwhere ĠT Ġ: ĠSomething , ĠT Ġ: ĠComparable < T > Ġ= ĊĠĠĠĠĠĠĠ Ġ_ do Nothing Receiver With TS ome thing Comparable . invoke ( this @ do Nothing ,) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġuse Unit Fun Rel ax er If ( relax Unit Fun Ġ|| Ġrelax ed ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġpublic Ġoverride Ġfun Ġ< T Ġ: ĠAny > ĠT . do Nothing (): ĠUnit Ġ= ĊĠĠĠĠĠĠĠ Ġ_ do Nothing Receiver With T Any . invoke ( this @ do Nothing ,) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġuse Unit Fun Rel ax er If ( relax Unit Fun Ġ|| Ġrelax ed ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġpublic Ġoverride Ġfun Ġ< T , ĠR Ġ: ĠAny > ĠT . do Nothing Else ( a : ĠR ): ĠUnit Ġwhere ĠT Ġ: ĠSomething , ĠT Ġ: ĊĠĠĠ ĠComparable < T > Ġ= Ġ_ do Nothing Else Receiver . invoke ( this @ do Nothing Else , a ) Ġ{ ĊĠĠĠĠĠĠĠ Ġuse Unit Fun Rel ax er If ( relax Unit Fun Ġ|| Ġrelax ed ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġpublic Ġoverride Ġfun Ġdo Nothing Else ( a : ĠAny ): ĠAny Ġ= Ġ_ do Nothing Else . invoke ( a ) ĊĊĠĠĠ Ġpublic Ġoverride Ġfun ĠAny thing Else . Something Inside . do Inside (): ĠInt Ġ= ĊĠĠĠĠĠĠĠ Ġ_ do Inside Receiver . invoke ( this @ do Inside ,) ĊĊĠĠĠ Ġpublic Ġoverride Ġfun Ġi Do (): ĠUnit Ġ= Ġ_ i Do . invoke () Ġ{ ĊĠĠĠĠĠĠĠ Ġuse Unit Fun Rel ax er If ( relax Unit Fun Ġ|| Ġrelax ed ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġpublic Ġfun Ġ_ clear Mock (): ĠUnit Ġ{ ĊĠĠĠĠĠĠĠ Ġ_ equals Receiver . clear () ĊĠĠĠĠĠĠĠ Ġ_ do Something Receiver . clear () ĊĠĠĠĠĠĠĠ Ġ_ do Something Else Receiver With Something Else . clear () ĊĠĠĠĠĠĠĠ Ġ_ do Something Else Receiver With ZT Any . clear () ĊĠĠĠĠĠĠĠ Ġ_ do Something Else . clear () ĊĠĠĠĠĠĠĠ Ġ_ mut abor Receiver . clear () ĊĠĠĠĠĠĠĠ Ġ_ mut abor . clear () ĊĠĠĠĠĠĠĠ Ġ_ do Nothing Receiver With TS ome thing Comparable . clear () ĊĠĠĠĠĠĠĠ Ġ_ do Nothing Receiver With T Any . clear () ĊĠĠĠĠĠĠĠ Ġ_ do Nothing Else Receiver . clear () ĊĠĠĠĠĠĠĠ Ġ_ do Nothing Else . clear () ĊĠĠĠĠĠĠĠ Ġ_ do Inside Receiver . clear () ĊĠĠĠĠĠĠĠ Ġ_ i Do . clear () ĊĠĠĠ Ġ} Ċ } Ċ