package Ġcom . fasterxml . jackson . module . kotlin . test . github Ċ Ċ import Ġcom . fasterxml . jackson . annotation . Json Creator Ċ import Ġcom . fasterxml . jackson . annotation . JsonProperty Ċ import Ġcom . fasterxml . jackson . databind . ObjectMapper Ċ import Ġcom . fasterxml . jackson . module . kotlin .* Ċ import Ġorg . junit . Test Ċ Ċ class ĠTestCase s From Slack 1 Ġ{ ĊĠĠĠ Ġdata Ġclass ĠHost Ġ@ Json Creator Ġconstructor ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ@ param : JsonProperty (" id ") Ġ@ get : JsonProperty (" id ") Ġval Ġid : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ@ param : JsonProperty (" name ") Ġ@ get : JsonProperty (" name ") Ġval Ġname : ĠString ) ĊĊĠĠĠ Ġdata Ġclass ĠEvent Ġ@ Json Creator Ġconstructor ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ@ param : JsonProperty (" host ") Ġ@ get : JsonProperty (" host ") Ġval Ġhost : ĠHost , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ@ param : JsonProperty (" activity ") Ġ@ get : JsonProperty (" activity ") Ġval Ġactivity : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ@ param : JsonProperty (" inv ited ") Ġ@ get : JsonProperty (" inv ited ") Ġval Ġinv ited : ĠList < Guest >) ĊĊĠĠĠ Ġdata Ġclass ĠGuest Ġ@ Json Creator Ġconstructor ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ@ param : JsonProperty (" id ") Ġ@ get : JsonProperty (" id ") Ġval Ġid : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ@ param : JsonProperty (" name ") Ġ@ get : JsonProperty (" name ") Ġval Ġname : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ@ param : JsonProperty (" r svp ") Ġ@ get : JsonProperty (" r svp ") Ġvar Ġr svp : ĠR SV P ) ĊĊĠĠĠ Ġenum Ġclass ĠR SV P ( val Ġname Key : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġgoing (" r svp . going "), Ġmaybe (" r svp . maybe "), Ġinterested (" r svp . inter ested ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġtest Cz ar Spring Thing 1 () Ġ{ ĊĠĠĠĠĠĠĠ ĠObjectMapper (). readValue < Event >(" "" ĊĠĠĠĠĠĠĠĠĠĠ Ġ{" host ":{" id ":" host 1 2 3 "," name ":" A ĠC z ar "}," activity ":" Kotlin ĠProgramming "," inv ited ":[{" id ":" Guest 1 "," name ":" Mr ĠKotlin "," r svp ": Ġ" going "}]} ĊĠĠĠĠĠĠĠ Ġ"" ") ĊĊĠĠĠĠĠĠĠ Ġj ack son ObjectMapper (). readValue < Event >(" "" ĊĠĠĠĠĠĠĠĠĠĠ Ġ{" host ":{" id ":" host 1 2 3 "," name ":" A ĠC z ar "}," activity ":" Kotlin ĠProgramming "," inv ited ":[{" id ":" Guest 1 "," name ":" Mr ĠKotlin "," r svp ": Ġ" going "}]} ĊĠĠĠĠĠĠĠ Ġ"" ") ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠTestCase s From Slack 2 Ġ{ ĊĠĠĠ Ġdata Ġclass ĠHost Ġ Ġconstructor ( ĊĠĠĠĠĠĠĠĠĠĠ Ġval Ġid : ĠString , ĊĠĠĠĠĠĠĠĠĠĠ Ġval Ġname : ĠString ) ĊĊĠĠĠ Ġdata Ġclass ĠEvent Ġ Ġconstructor ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġhost : ĠHost , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġactivity : ĠString , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġinv ited : ĠList < Guest >) ĊĊĠĠĠ Ġdata Ġclass ĠGuest Ġconstructor ( ĊĠĠĠĠĠĠĠĠĠĠ Ġval Ġid : ĠString , ĊĠĠĠĠĠĠĠĠĠĠ Ġval Ġname : ĠString , ĊĠĠĠĠĠĠĠĠĠĠ Ġvar Ġr svp : ĠR SV P Ġ= ĠR SV P . going ) ĊĊĠĠĠ Ġenum Ġclass ĠR SV P ( val Ġname Key : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġgoing (" r svp . going "), Ġmaybe (" r svp . maybe "), Ġinterested (" r svp . inter ested ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test Ġfun Ġtest Cz ar Spring Thing 2 () Ġ{ ĊĠĠĠĠĠĠĠ Ġj ack son ObjectMapper (). readValue < Event >(" "" ĊĠĠĠĠĠĠĠĠĠĠ Ġ{" host ":{" id ":" host 1 2 3 "," name ":" A ĠC z ar "}," activity ":" Kotlin ĠProgramming "," inv ited ":[{" id ":" Guest 1 "," name ":" Mr ĠKotlin "," r svp ": Ġ" going "}]} ĊĠĠĠĠĠĠĠ Ġ"" ") ĊĠĠĠ Ġ} Ċ }