package Ġn ft . free port . processor . cms . ja Ċ Ċ import Ġcom . github . tom ake hur st . wire mock . Wire Mock Server Ċ import Ġcom . github . tom ake hur st . wire mock . client . Wire Mock .* Ċ import Ġio . quarkus . test . common . Qu ark us Test Resource Ċ import Ġio . quarkus . test . junit . Qu ark us Test Ċ import Ġkotlinx . serialization . json . put Ċ import Ġn ft . free port . build Json String Ċ import Ġn ft . free port . listener . event . Joint Account Share Created Ċ import Ġn ft . free port . processor . cms . Inject Str api Wire mock Ċ import Ġn ft . free port . processor . cms . Wire mock Str api Ċ import Ġn ft . free port . processor . cms . stub Entity Creation Ċ import Ġn ft . free port . wrap Event Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġjavax . inject . Inject Ċ Ċ @ Qu ark us Test Ċ @ Qu ark us Test Resource ( Wire mock Str api :: class ) Ċ class ĠJoin Account Event Processor Test Ġ{ ĊĊĠĠĠ Ġ@ field : Inject Str api Wire mock ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġwire Mock Server : ĠWire Mock Server ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġtest Subject : ĠJoin Account Event Processor ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` processor Ġis Ġcalled Ġ-- Ġcreation Ġrequest Ġis Ġsent Ġto Ġstr api `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġevent Ġ= ĠJoint Account Share Created ( account Ġ= Ġ" account ", Ġowner Ġ= Ġ" owner ", Ġfraction Ġ= Ġ 4 2 ) ĊĠĠĠĠĠĠĠ Ġwire Mock Server . stub Entity Creation ( entity Path Ġ= Ġ"/ creator - joint - accounts ") ĊĊĠĠĠĠĠĠĠ Ġtest Subject . process ( event . wrap Event ()) ĊĊĠĠĠĠĠĠĠ Ġwire Mock Server . verify ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpost Requested For ( urlPath EqualTo ("/ creator - joint - accounts ")). with RequestBody ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġequal ToJson ( build Json String Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġput (" owner ", Ġevent . owner ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġput (" account ", Ġevent . account ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ }