package Ġno . sk at te et aten . aur ora . b oo ber . controller . v 2 Ċ Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . springframework . boot . test . autoconfigure . web . servlet . Web Mvc Test Ċ import Ġcom . nin jas quad . spring mock k . Mock k Bean Ċ import Ġio . mock k . every Ċ import Ġno . sk at te et aten . aur ora . b oo ber . controller . v 1 . Abstract Controller Test Ċ import Ġno . sk at te et aten . aur ora . b oo ber . facade . Application SearchResult Ċ import Ġno . sk at te et aten . aur ora . b oo ber . facade . A ur ora Config Facade Ċ import Ġno . sk at te et aten . aur ora . b oo ber . model . Application Deployment Ref Ċ import Ġno . sk at te et aten . aur ora . mock mvc . extensions . Path Ċ import Ġno . sk at te et aten . aur ora . mock mvc . extensions . get Ċ import Ġno . sk at te et aten . aur ora . mock mvc . extensions . response Json Path Ċ import Ġno . sk at te et aten . aur ora . mock mvc . extensions . status Is Ok Ċ Ċ @ Web Mvc Test ( controllers Ġ= Ġ[ Search Controller :: class ]) Ċ class ĠSearch Controller Test Ġ: ĠAbstract Controller Test () Ġ{ ĊĊĠĠĠ Ġ@ Mock k Bean ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġfac ade : ĠA ur ora Config Facade ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` Search Ġfor Ġenvironment Ġby Ġname `() Ġ{ ĊĊĠĠĠĠĠĠĠ Ġevery Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfac ade . search For Applications ( any (), Ġany ()) ĊĠĠĠĠĠĠĠ Ġ} Ġreturns ĠlistOf ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠApplication SearchResult ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġaffili ation Ġ= Ġ" my Aff iliation ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġauto Deploy Ġ= Ġtrue , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġapplication Deployment Ref Ġ= ĠApplication Deployment Ref (" env ", Ġ" some App "), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġwarning Message Ġ= Ġ" This Ġis Ġw aring " ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠApplication SearchResult ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġaffili ation Ġ= Ġ" my Aff iliation ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġauto Deploy Ġ= Ġtrue , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġapplication Deployment Ref Ġ= ĠApplication Deployment Ref (" env ", Ġ" some App 2 "), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠerrorMessage Ġ= Ġ" Some Ġerror " ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġmock Mvc . get ( path Ġ= ĠPath ("/ v 2 / search ? environment ={ name }", Ġ" fk 1 - ut v ")) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstatus Is Ok () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġresponse Json Path (" $. success "). isTrue () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġresponse Json Path (" $. count "). equals Value ( 2 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġresponse Json Path (" $. items . length () "). equals Value ( 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġresponse Json Path (" $. errors . length () "). equals Value ( 1 ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ