package Ġorg . w ats i . enrollment . device . db . models Ċ Ċ import Ġorg . junit . Assert . assertEquals Ċ import Ġorg . junit . Assert . assertNull Ċ import Ġorg . junit . Test Ċ import Ġorg . th reet en . bp . Instant Ċ import Ġorg . w ats i . enrollment . device . factories . Member Model Factory Ċ import Ġorg . w ats i . enrollment . device . factories . Photo Model Factory Ċ import Ġjava . util . UUID Ċ Ċ class ĠMember With Thumbnail Model Test Ġ{ ĊĊĠĠĠ Ġval Ġnow Ġ= ĠInstant . now () ĊĠĠĠ Ġval Ġmember Model Ġ= ĠMember Model Factory . build ( ĊĠĠĠĠĠĠĠ Ġhouse hold Id Ġ= ĠUUID . randomUUID (), ĊĠĠĠĠĠĠĠ Ġen rolled At Ġ= Ġnow , ĊĠĠĠĠĠĠĠ Ġcard Id Ġ= Ġ" R WI 1 2 3 1 2 3 ", ĊĠĠĠĠĠĠĠ Ġphoto Id Ġ= Ġnull , ĊĠĠĠĠĠĠĠ Ġthumbnail Photo Id Ġ= Ġnull ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġ@ Test ( expected Ġ= ĠIllegalStateException :: class ) ĊĠĠĠ Ġfun Ġto Member With Thumbnail _ null Member Model () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmember With Thumbnail Model Ġ= ĠMember With Thumbnail Model ( null , Ġempty List ()) ĊĠĠĠĠĠĠĠ Ġmember With Thumbnail Model . to Member With Thumbnail () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġto Member With Thumbnail _ null Photo Models () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmember With Thumbnail Model Ġ= ĠMember With Thumbnail Model ( member Model , Ġnull ) ĊĊĠĠĠĠĠĠĠ Ġval Ġmember With Photo Entity Ġ= Ġmember With Thumbnail Model . to Member With Thumbnail () ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( member Model . to Member (), Ġmember With Photo Entity . member ) ĊĠĠĠĠĠĠĠ ĠassertNull ( member With Photo Entity . photo ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġto Member With Thumbnail _ with Member And Empty Photo Models () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġmember With Thumbnail Model Ġ= ĠMember With Thumbnail Model ( member Model , Ġempty List ()) ĊĊĠĠĠĠĠĠĠ Ġval Ġmember With Thumbnail Ġ= Ġmember With Thumbnail Model . to Member With Thumbnail () ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( member Model . to Member (), Ġmember With Thumbnail . member ) ĊĠĠĠĠĠĠĠ ĠassertNull ( member With Thumbnail . photo ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġto Member With Thumbnail _ with Member And Photo Models () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġphoto Model Ġ= ĠPhoto Model Factory . build ( id Ġ= ĠUUID . randomUUID ()) ĊĠĠĠĠĠĠĠ Ġval Ġmember With Thumbnail Model Ġ= ĠMember With Thumbnail Model ( member Model , ĠlistOf ( photo Model )) ĊĊĠĠĠĠĠĠĠ Ġval Ġmember With Thumbnail Ġ= Ġmember With Thumbnail Model . to Member With Thumbnail () ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( member Model . to Member (), Ġmember With Thumbnail . member ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( photo Model . to Photo (), Ġmember With Thumbnail . photo ) ĊĠĠĠ Ġ} Ċ } Ċ