package Ġua . val d _ zx . simp lex ml . k sp . test . converter Ċ Ċ import Ġua . val d _ zx . simp lex ml . k sp . Convert Ċ import Ġua . val d _ zx . simp lex ml . k sp . Element Ċ import Ġua . val d _ zx . simp lex ml . k sp . Simple Xml Ċ import Ġua . val d _ zx . simp lex ml . k sp . test . cust omp ackage . Test Serial izers En rol ment Ċ import Ġkotlin . js . Js Name Ċ import Ġkotlin . test . Before Test Ċ import Ġkotlin . test . Test Ċ import Ġkotlin . test . assertEquals Ċ Ċ data Ġclass ĠWith Converter Constructor Field ( ĊĠĠĠ Ġ@ field :[ Element ĠConvert ( Test String Converter :: class )] ĊĠĠĠ Ġvar Ġtag : ĠString Ċ ) Ċ Ċ class ĠField In Constructor Converter Test Ġ{ ĊĊĠĠĠ Ġ@ Before Test ĊĠĠĠ Ġfun Ġinit () Ġ{ ĊĠĠĠĠĠĠĠ ĠTest Serial izers En rol ment . en rol () ĊĠĠĠĠĠĠĠ ĠSimple Xml . pretty Ġ= Ġfalse ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Js Name (" With Converter Constructor Field Test ") ĊĠĠĠ Ġfun Ġ` With Converter Constructor Field Ġserialize Ġdeserialize Ġtest `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbean Ġ= ĠWith Converter Constructor Field (" With Converter Constructor Field ") ĊĠĠĠĠĠĠĠ Ġval Ġxml Ġ= ĠSimple Xml . serialize ( bean ) ĊĠĠĠĠĠĠĠ Ġprintln ( xml ) ĊĠĠĠĠĠĠĠ Ġval Ġdeserialized Bean : ĠWith Converter Constructor Field Ġ= ĠSimple Xml . deserialize ( xml ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( bean , Ġdeserialized Bean ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Js Name (" With Converter Constructor Field Deserialize Test ") ĊĠĠĠ Ġfun Ġ` With Converter Constructor Field Ġdeserialize Ġtest `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġdeserialized Bean : ĠWith Converter Constructor Field Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSimple Xml . deserialize ("< With Converter Constructor Field >< tag > ~~~ Secret ~~~ </ tag ></ With Converter Constructor Field >") ĊĠĠĠĠĠĠĠ ĠassertEquals (" Secret ", Ġdeserialized Bean . tag ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Js Name (" With Converter Constructor Field Serialize Test ") ĊĠĠĠ Ġfun Ġ` With Converter Constructor Field Test Ġserialize Ġtest `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbean Ġ= ĠWith Converter Constructor Field (" Secret ") ĊĠĠĠĠĠĠĠ Ġval Ġxml Ġ= ĠSimple Xml . serialize ( bean ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( xml , Ġ"< With Converter Constructor Field >< tag > ~~~ Secret ~~~ </ tag ></ With Converter Constructor Field >") ĊĠĠĠ Ġ} Ċ }