package Ġno . nav . yr k ess k ade . ska def ork lar ing . integration . mot tak Ċ Ċ import Ġcom . fasterxml . jackson . datatype . js r 3 1 0 . Java Time Module Ċ import Ġcom . fasterxml . jackson . module . kotlin . jackson ObjectMapper Ċ import Ġno . nav . yr k ess k ade . ska def ork lar ing . integration . mot tak . model . S ka def ork lar ing In ns ending H en del se Ċ import Ġno . nav . yr k ess k ade . ska def ork lar ing . integration . mot tak . model . S ka def ork lar ing Metadata Ċ import Ġno . nav . yr k ess k ade . ska def ork lar ing . integration . mot tak . model . Spr a ak Ċ import Ġno . nav . yr k ess k ade . ska def ork lar ing . model . S ka def ork lar ing Ċ import Ġno . nav . yr k ess k ade . ska def ork lar ing . test . Abstract Test Ċ import Ġno . nav . yr k ess k ade . ska def ork lar ing . test . fixtures . get En kel ska def ork lar ing Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . boot . test . context . SpringBootTest Ċ import Ġjava . time . Instant Ċ import Ġjava . util .* Ċ import Ġjava . util . concurrent . TimeUnit Ċ Ċ @ SpringBootTest Ċ class ĠS ka def ork lar ing In ns ending Client IT Ġ: ĠAbstract Test () Ġ{ ĊĊĠĠĠ Ġ@ Autowired ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġsk a def ork lar ing In ns ending Client : ĠS ka def ork lar ing In ns ending Client ĊĊĠĠĠ Ġprivate Ġval ĠobjectMapper Ġ= Ġj ack son ObjectMapper (). register Module ( Java Time Module ()) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` send Ġme ld ing Ġtil Ġmot tak `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġsk a def ork lar ing : ĠS ka def ork lar ing Ġ= Ġget En kel ska def ork lar ing () ĊĠĠĠĠĠĠĠ Ġval Ġsk a def ork lar ing In ns ending H en del se Ġ= ĠS ka def ork lar ing In ns ending H en del se ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsk a def ork lar ing Ġ= Ġsk a def ork lar ing , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmetadata Ġ= ĠS ka def ork lar ing Metadata ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtid sp unkt M ott att Ġ= ĠInstant . now (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġspr a ak Ġ= ĠSpr a ak . NB , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnav Call Id Ġ= ĠUUID . randomUUID (). toString () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ), ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ ĠassertThat ( ska def ork lar ing In ns ending H en del se . ska def ork lar ing ). isNotNull () ĊĠĠĠĠĠĠĠ ĠassertThat ( ska def ork lar ing In ns ending H en del se . metadata . sp ra ak ). isEqualTo ( Spr a ak . NB ) ĊĠĠĠĠĠĠĠ Ġsk a def ork lar ing In ns ending Client . send Mel ding ( ska def ork lar ing In ns ending H en del se ) ĊĠĠĠĠĠĠĠ Ġmot tak Consumer . get Latch (). await ( 1 0 0 0 0 , ĠTimeUnit . MILLISECONDS ) ĊĠĠĠĠĠĠĠ ĠassertThat ( mot tak Consumer . get Payload ()). contains ("\" n ors k Ident it ets nummer \":\" 1 2 3 4 5 6 7 8 9 1 0 \" ") ĊĠĠĠ Ġ} Ċ }