package Ġcom . li ang jun . pup py ad option . network . mock Ċ Ċ import Ġcom . google . gson . Gson Ċ import Ġcom . google . gson . reflect . Type Token Ċ import Ġcom . li ang jun . pup py ad option . network . model . P up py Dto Ċ Ċ fun Ġget P up py Data () Ġ= Ġ""" ĊĠĠĠ Ġ[ ĊĠĠĠ Ġ{" pk ":" 0 "," name ":" M itch y "," age ": 2 ," featured _ image ":" https :// i . gu im . co . uk / img / media / fe 1 e 3 4 da 6 4 0 c 5 c 5 6 ed 1 6 f 7 6 ce 6 f 9 9 4 fa 9 3 4 3 d 0 9 d / 0 _ 1 7 4 _ 3 4 0 8 _ 2 0 4 6 / master / 3 4 0 8 . jpg ? width = 1 2 0 0 & height = 9 0 0 & quality = 8 5 & auto = format & fit = crop & s = 0 d 3 f 3 3 fb 6 aa 6 e 0 1 5 4 b 7 7 1 3 a 0 0 4 5 4 c 8 3 d "," create _ time ":" 2 0 2 1 - 0 2 - 2 6 Ġ 2 0 : 1 7 : 1 3 "," bre ed ":" unknown "," gender ":" male "," fav our ite ":" b alls ", Ġ" ad opt ed ": false , Ġ" brief ":" A Ġdog Ġwho Ġstay ed Ġby Ġhis Ġowner 's Ġside Ġfor Ġtwo Ġdays Ġafter Ġhe Ġbecame Ġtr apped Ġin Ġthe Ġsnow Ġand Ġdi ed Ġhas Ġfound Ġa Ġnew Ġhome Ġto Ġcall Ġhis Ġown ." }, ĊĠĠĠ Ġ{" pk ":" 1 "," name ":" Do ge "," age ": 3 ," featured _ image ":" https :// hip s . he ar st apps . com / h mg - prod . s 3 . amazonaws . com / images / get ty images - 1 0 9 4 8 7 4 7 2 6 . png ? crop = 0 . 5 4 2 xw : 0 . 8 1 4 xh ; 0 . 0 4 7 2 xw , 0 . 1 2 7 xh & resize = 6 4 0 :* "," create _ time ":" 2 0 2 1 - 0 2 - 2 6 Ġ 2 0 : 1 7 : 1 3 "," bre ed ":" unknown "," gender ":" male "," fav our ite ":" b alls ", Ġ" ad opt ed ": true , Ġ" brief ":" no Ġmore Ġinformation "}, ĊĠĠĠ Ġ{" pk ":" 2 "," name ":" Pe ay e "," age ": 1 ," featured _ image ":" https :// hip s . he ar st apps . com / h mg - prod . s 3 . amazonaws . com / images / dog - pup py - on - g arden - roy alty - free - image - 1 5 8 6 9 6 6 1 9 1 . jpg ? crop = 1 . 0 0 xw : 0 . 6 6 9 xh ; 0 , 0 . 1 9 0 xh & resize = 1 2 0 0 :* "," create _ time ":" 2 0 2 1 - 0 2 - 2 6 Ġ 2 0 : 1 7 : 1 3 "," bre ed ":" unknown "," gender ":" male "," fav our ite ":" b alls ", Ġ" ad opt ed ": false , Ġ" brief ":" no Ġmore Ġinformation "}, ĊĠĠĠ Ġ{" pk ":" 3 "," name ":" Set t "," age ": 4 ," featured _ image ":" https :// gg sc . s 3 . amazonaws . com / images / uploads / The _ Science - Back ed _ Bene fits _ of _ Being _ a _ Dog _ Owner . jpg "," create _ time ":" 2 0 2 1 - 0 2 - 2 6 Ġ 2 0 : 1 7 : 1 3 "," bre ed ":" unknown "," gender ":" male "," fav our ite ":" b alls ", Ġ" ad opt ed ": false , Ġ" brief ":" no Ġmore Ġinformation "} ĊĠĠĠ Ġ] Ċ """. trim Indent () Ċ Ċ fun Ġget P up py Detail ById ( id : ĠString ): ĠP up py Dto Ġ{ ĊĠĠĠ Ġval Ġp up p ies Ġ= ĠGson (). fromJson < List < P up py Dto >>( ĊĠĠĠĠĠĠĠ Ġget P up py Data (), ĊĠĠĠĠĠĠĠ Ġobject Ġ: ĠType Token < List < P up py Dto >>() Ġ{} . type ĊĠĠĠ Ġ) ĊĠĠĠ Ġ// ensure Ġthe Ġp up py Ġdoes Ġexist ĊĠĠĠ Ġreturn Ġp up p ies . find Ġ{ Ġit . id Ġ== Ġid Ġ} !! Ċ }