package Ġio . hol unda . camunda . bpm . data Ċ Ċ import Ġio . hol unda . camunda . bpm . data . Cam unda B pm Data Kotlin . map Variable Ċ import Ġio . hol unda . camunda . bpm . data . Cam unda B pm Data Kotlin . map Variable NotNull able Ċ import Ġio . hol unda . camunda . bpm . data . Nullable Map Test . Test Variables . NO _ NULL _ MAP Ċ import Ġio . hol unda . camunda . bpm . data . Nullable Map Test . Test Variables . NULL _ MAP Ċ import Ġio . hol unda . camunda . bpm . data . factory . Variable Factory Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . camunda . bpm . extension . mockito . Cam unda Mockito . delegate Execution Fake Ċ import Ġorg . junit . Test Ċ Ċ internal Ġclass ĠNullable Map Test Ġ{ ĊĊĠ Ġobject ĠTest Variables Ġ{ ĊĠĠĠ Ġval ĠNO _ NULL _ MAP : ĠVariable Factory < Map < String , ĠAny >> Ġ= Ġmap Variable NotNull able (" no Null Values ") ĊĠĠĠ Ġval ĠNULL _ MAP : ĠVariable Factory < Map < String , ĠAny ? >> Ġ= Ġmap Variable (" may Have Null Values ") ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġnull Ġvalues Ġmap Ġas Ġno Ġnull Ġvalue Ġmap `() Ġ{ ĊĠĠĠ Ġval Ġdata Ġ= Ġmap Of (" first " Ġto Ġ 1 , Ġ" second " Ġto Ġnull , Ġ" last " Ġto Ġ" string ") ĊĠĠĠ Ġval Ġmock Execution Ġ= Ġdelegate Execution Fake (). with Variable ( NO _ NULL _ MAP . name , Ġdata ) ĊĠĠĠ Ġ// ĠNO _ NULL _ MAP . on ( mock Execution ). set ( data ) Ġ// Ġwon 't Ġcompile , Ġwrong Ġtype ĊĠĠĠ Ġval Ġmap : ĠMap < String , ĠAny > Ġ= ĠNO _ NULL _ MAP . from ( mock Execution ). get () ĊĠĠĠ Ġval Ġsecond Ġ= Ġmap . getValue (" second ") ĊĠĠĠ ĠassertThat ( second ). isNull () ĊĠ Ġ} ĊĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` test Ġnull Ġvalues Ġmap `() Ġ{ ĊĠĠĠ Ġval Ġdata Ġ= Ġmap Of (" first " Ġto Ġ 1 , Ġ" second " Ġto Ġnull , Ġ" last " Ġto Ġ" string ") ĊĠĠĠ Ġval Ġmock Execution Ġ= Ġdelegate Execution Fake () ĊĠĠĠ ĠNULL _ MAP . on ( mock Execution ). set ( data ) ĊĠĠĠ Ġ// Ġval Ġresult : ĠMap < String , ĠAny > Ġ= ĠNULL _ MAP . from ( mock Execution ). get () Ġ// Ġno Ġassignable ĊĠĠĠ Ġval Ġresult : ĠMap < String , ĠAny ?> Ġ= ĠNULL _ MAP . from ( mock Execution ). get () ĊĠĠĠ ĠassertThat ( result ). isEqualTo ( data ) ĊĠĠĠ Ġval Ġsecond Ġ= Ġresult . getValue (" second ") ĊĠĠĠ ĠassertThat ( second ). isNull () ĊĠ Ġ} Ċ Ċ } Ċ