package Ġcom . th om ask io ko . pay bill manager . data . test . mapper Ċ Ċ import Ġcom . th om ask io ko . pay bill manager . data . mapper . Category Mapper Ċ import Ġcom . th om ask io ko . pay bill manager . data . model . Category Entity Ċ import Ġcom . th om ask io ko . pay bill manager . data . test . factory . Category Data Factory Ċ import Ġcom . th om ask io ko . pay bill manager . domain . model . Category Ċ import Ġjunit . framework . TestCase . assertEquals Ċ import Ġorg . junit . Test Ċ import Ġorg . junit . runner . RunWith Ċ import Ġorg . junit . runners . JUnit 4 Ċ Ċ @ RunWith ( JUnit 4 :: class ) Ċ class ĠCategory Mapper Test Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġmapper Ġ= ĠCategory Mapper () ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġmap From Entity Maps Data () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġentity Ġ= ĠCategory Data Factory . make Category Entity () ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= Ġmapper . map From Entity ( entity ) ĊĊĠĠĠĠĠĠĠ Ġassert Equal Data ( entity , Ġmodel ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġmap To Entity Maps Data () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmodel Ġ= ĠCategory Data Factory . make Category () ĊĠĠĠĠĠĠĠ Ġval Ġentity Ġ= Ġmapper . map To Entity ( model ) ĊĊĠĠĠĠĠĠĠ Ġassert Equal Data ( entity , Ġmodel ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġassert Equal Data ( entity : ĠCategory Entity , Ġmodel : ĠCategory ) Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals ( entity . id , Ġmodel . id ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( entity . category Name , Ġmodel . category Name ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( entity . drawable Url , Ġmodel . drawable Url ) ĊĠĠĠ Ġ} Ċ }