package Ġbr . org . ces ar . k not . ke ger ator . presentation . mapper Ċ Ċ import Ġbr . org . ces ar . k not . ke ger ator . domain . model . K eg Ċ import Ġbr . org . ces ar . k not . ke ger ator . presentation . model . K eg Model Ċ import Ġbr . org . ces ar . k not . ke ger ator . test . K eg Factory Ċ import Ġbr . org . ces ar . k not . ke ger ator . test . K eg Model Factory Ċ import Ġorg . junit . Assert .* Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ Ċ class ĠK eg Model Mapper Test Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġke g Model Mapper : ĠK eg Model Mapper ĊĊĠĠĠ Ġ@ Before ĊĠĠĠ Ġfun ĠsetUp () Ġ{ ĊĠĠĠĠĠĠĠ Ġke g Model Mapper Ġ= ĠK eg Model Mapper () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġmap To Model () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġke g Ġ= ĠK eg Factory . make K eg () ĊĠĠĠĠĠĠĠ Ġval Ġke g Model Ġ= Ġke g Model Mapper . map To Model ( ke g ) ĊĊĠĠĠĠĠĠĠ Ġassert K eg Data Equality ( ke g Model , Ġke g ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġmap From Model () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġke g Model Ġ= ĠK eg Model Factory . make K eg Model () ĊĠĠĠĠĠĠĠ Ġval Ġke g Ġ= Ġke g Model Mapper . map From Model ( ke g Model ) ĊĊĠĠĠĠĠĠĠ Ġassert K eg Data Equality ( ke g Model , Ġke g ) ĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġprivate Ġfun Ġassert K eg Data Equality ( ke g Model : ĠK eg Model , Ġke g : ĠK eg ) Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals ( ke g Model . id , Ġke g . id . toString ()) ĊĠĠĠĠĠĠĠ ĠassertEquals ( ke g Model . name , Ġke g . name ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( ke g Model . weight , Ġke g . weight . toString ()) ĊĠĠĠ Ġ} Ċ }