package Ġcom . example . my rest aurants Ċ Ċ import Ġandroid . app . Application Ċ import Ġcom . example . my rest aurants . data . network . response . home _ page . Menu Response Ċ import Ġcom . example . my rest aurants . data . network . response . home _ page . Restaurant Response Ċ import Ġcom . example . my rest aurants . di . app Component Ċ import Ġcom . example . my rest aurants . utils . File Util Ċ import Ġorg . k oin . android . ext . k oin . android Context Ċ import Ġorg . k oin . android . ext . k oin . android Logger Ċ import Ġorg . k oin . core . context . start K oin Ċ import Ġorg . k oin . core . logger . Level Ċ Ċ class ĠRest aurants Application Ġ: ĠApplication () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate () ĊĠĠĠĠĠĠĠ Ġload Data () ĊĠĠĠĠĠĠĠ Ġinit K oin () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġinit K oin () Ġ{ ĊĠĠĠĠĠĠĠ Ġstart K oin Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġandroid Logger ( Level . DEBUG ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġandroid Context ( this @ Rest aurants Application ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmodules ( provide Dependency ()) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ// List Ġof ĠK oin Ġdependencies ĊĠĠĠ Ġprivate Ġfun Ġprovide Dependency () Ġ= Ġapp Component ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġvar Ġmock Restaurant Response : ĠRest aurant Response ? Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġvar Ġmock Menu Response : ĠMenu Response ? Ġ= Ġnull ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġload Data () Ġ{ ĊĠĠĠĠĠĠĠ Ġmock Restaurant Response Ġ= ĠFile Util . load JSON Response From Asset ( this , Ġ" JSON / rest aurants _ list . txt ", ĠRest aurant Response :: class . java ) ĊĠĠĠĠĠĠĠ Ġmock Menu Response Ġ= ĠFile Util . load JSON Response From Asset ( this , Ġ" JSON / menu _ list . txt ", ĠMenu Response :: class . java ) ĊĠĠĠ Ġ} Ċ } Ċ