package Ġuk . gov . just ice . digital . h mp ps . manager ec alls api . integration . documents Ċ Ċ import Ġcom . nat pr y ce . ham k rest . assertion . assertThat Ċ import Ġcom . nat pr y ce . ham k rest . equalTo Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġuk . gov . just ice . digital . h mp ps . manager ec alls api . controller . Book Re call Request Ċ import Ġuk . gov . just ice . digital . h mp ps . manager ec alls api . controller . Local Delivery Unit Ċ import Ġuk . gov . just ice . digital . h mp ps . manager ec alls api . controller . Pdf Ċ import Ġuk . gov . just ice . digital . h mp ps . manager ec alls api . db . Document Category . DO SS I ER Ċ import Ġuk . gov . just ice . digital . h mp ps . manager ec alls api . db . Document Category . RE CALL _ NOTIFICATION Ċ import Ġuk . gov . just ice . digital . h mp ps . manager ec alls api . domain . FirstName Ċ import Ġuk . gov . just ice . digital . h mp ps . manager ec alls api . domain . LastName Ċ import Ġuk . gov . just ice . digital . h mp ps . manager ec alls api . domain . Nom s Number Ċ import Ġuk . gov . just ice . digital . h mp ps . manager ec alls api . domain . Pr ison Id Ċ import Ġuk . gov . just ice . digital . h mp ps . manager ec alls api . matchers . has NumberOf Pages Ċ Ċ class ĠDo ssier Generation Got en berg Component Test Ġ: ĠGot en berg Component TestBase () Ġ{ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` can Ġgenerate Ġa Ġdo ssier Ġusing Ġgot en berg Ġfor Ġan ĠEnglish ĠL DU Ġand ĠEnglish Ġcurrent ĠPr ison `() Ġ{ ĊĠĠĠ Ġgenerate Do ssier Using Got en berg ( Local Delivery Unit . PS _ HO UN S LOW , Ġ 1 1 , ĠPr ison Id (" M WI ")) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` can Ġgenerate Ġa Ġdo ssier Ġusing Ġgot en berg Ġfor Ġa ĠW el sh ĠL DU Ġand ĠEnglish Ġcurrent ĠPr ison `() Ġ{ ĊĠĠĠ Ġgenerate Do ssier Using Got en berg ( Local Delivery Unit . PS _ NORTH _ WAL ES , Ġ 1 5 , ĠPr ison Id (" M WI ")) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` can Ġgenerate Ġa Ġdo ssier Ġusing Ġgot en berg Ġfor Ġan ĠEnglish ĠL DU Ġand ĠW el sh Ġcurrent ĠPr ison `() Ġ{ ĊĠĠĠ Ġgenerate Do ssier Using Got en berg ( Local Delivery Unit . PS _ HO UN S LOW , Ġ 1 5 , ĠPr ison Id (" C FI ")) ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġgenerate Do ssier Using Got en berg ( ĊĠĠĠ Ġlocal Delivery Unit : ĠLocal Delivery Unit , ĊĠĠĠ Ġexpected Page Count : ĠInt , ĊĠĠĠ Ġcurrent Pr ison Id : ĠPr ison Id ĊĠ Ġ) Ġ{ ĊĠĠĠ Ġval Ġnom s Number Ġ= ĠN oms Number (" 1 2 3 4 5 6 ") ĊĠĠĠ Ġval Ġpr isoner FirstName Ġ= Ġ" N atal ia " ĊĠĠĠ Ġexpect AP r isoner Will Be Found For ( nom s Number , Ġpr isoner FirstName ) ĊĊĠĠĠ Ġval Ġrecall Ġ= ĊĠĠĠĠĠ Ġauthenticated Client . book Re call ( Book Re call Request ( nom s Number , ĠFirst Name (" Bar rie "), Ġnull , ĠLast Name (" Bad ger "))) ĊĠĠĠ Ġupdate Re call With Required Information For The Do ssier ( ĊĠĠĠĠĠ Ġrecall . recall Id , ĊĠĠĠĠĠ Ġlocal Delivery Unit Ġ= Ġlocal Delivery Unit , ĊĠĠĠĠĠ Ġcurrent Pr ison Id Ġ= Ġcurrent Pr ison Id ĊĠĠĠ Ġ) ĊĠĠĠ Ġauthenticated Client . generate Document ( recall . recall Id , ĠRE CALL _ NOTIFICATION ) ĊĠĠĠ Ġexpect No V ir uses Will Be Found () ĊĠĠĠ Ġupload Lic ence For ( recall ) ĊĠĠĠ Ġupload Part A For ( recall ) ĊĊĠĠĠ Ġval Ġgenerate Response Ġ= Ġauthenticated Client . generate Document ( recall . recall Id , ĠDO SS I ER ) ĊĠĠĠ Ġval Ġdo ssier Ġ= Ġauthenticated Client . getDocument ( recall . recall Id , Ġgenerate Response . document Id ) ĊĠĠĠ Ġ// Ġwrite Base 6 4 Encoded String ToFile (" do ssier -$ expected Page Count - pages . pdf ", Ġdo ssier . content ) ĊĠĠĠ ĠassertThat ( Pdf ( do ssier . content ), Ġhas NumberOf Pages ( equalTo ( expected Page Count ))) ĊĠ Ġ} Ċ } Ċ