package Ġcom . rik uch erry . art work espress o . feature _ topic _ selection . domain . repository Ċ Ċ import Ġcom . rik uch erry . art work espress o . feature _ authentication . domain . repository . ErrorResponse Ċ import Ġcom . rik uch erry . art work espress o . feature _ topic _ selection . data . remote . data _ source . Top Topic List Dto Ċ import Ġcom . rik uch erry . art work espress o . feature _ topic _ selection . data . repository . Topic Select Repository Ċ import Ġcom . sky do ves . sand wich . ApiResponse Ċ import Ġokhttp 3 . ResponseBody . Companion . to ResponseBody Ċ Ċ /** Ċ Ġ* ĠMock Ġrepository Ġimplementation Ġof ĠTopic Select Repository Ċ Ġ* Ċ Ġ* ĠFor Ġerror Ġresponses Ċ Ġ*/ Ċ class ĠFake Topic Select Repository Error Impl : ĠTopic Select Repository Ġ{ ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠMock Ġup Ġan Ġerror Ġresponse Ġfrom Ġget Top Topics ĠApi ĊĠĠĠĠ Ġ* ĊĠĠĠĠ Ġ* Ġerror Ġcode : Ġ 4 0 0 ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġget Top Topics ( token : ĠString ): ĠApiResponse < Top Topic List Dto > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġerror Response Ġ= ĠError Response ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġerror Ġ= Ġ" invalid _ request ", ĊĠĠĠĠĠĠĠĠĠĠĠ Ġerror Description Ġ= Ġ" fake Ġmessage ." ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġreturn ĠApiResponse . Failure . Error ( ret rofit 2 . Response ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. error ( 4 0 0 , Ġerror Response . toString (). to ResponseBody ())) ĊĠĠĠ Ġ} Ċ }