package Ġcom . h ml r . flows Ċ Ċ import Ġcom . h ml r . common . exception . State NotFound On Vault Exception Ċ import Ġcom . h ml r . model . DT C Consent Status Ċ import Ġcom . h ml r . states . Pro posed Char ges And Restrictions State Ċ import Ġorg . junit . Test Ċ import Ġkotlin . test . assert Fails With Ċ Ċ class ĠRequest For Dis charge Flow Tests Ġ: ĠAbstract Flow TestUtils () Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` Request Ġfor Ġdis charge Ġon Ġland Ġtitle ` (){ ĊĠĠĠĠĠĠĠ Ġrequest For Dis charge ( seller Convey ancer ) ĊĠĠĠĠĠĠĠ Ġmock Network . wait Qu ies cent () ĊĊĠĠĠĠĠĠĠ Ġ// Ġcheck Ġfor ĠCharge Ġand ĠRe striction Ġstate Ġon Ġsell er Ġcon vey ancer Ġnode ĊĠĠĠĠĠĠĠ Ġsell er Convey ancer . transaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcharge And Restriction State Ġ= Ġsell er Convey ancer . services . vault Service . query By ( Pro posed Char ges And Restrictions State :: class . java ). states ĊĠĠĠĠĠĠĠĠĠĠĠ Ġassert ( charge And Restriction State . size Ġ== Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġassert ( charge And Restriction State [ 0 ]. state . data . status Ġ== ĠD TC Consent Status . REQUEST _ TO _ ADD _ CON SENT _ FOR _ DIS CHAR GE ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġ// Ġcheck Ġfor ĠCharge Ġand ĠRe striction Ġstate Ġon Ġsell er Ġl ender Ġnode ĊĠĠĠĠĠĠĠ Ġsell er L ender . transaction Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcharge And Restriction State Ġ= Ġsell er L ender . services . vault Service . query By ( Pro posed Char ges And Restrictions State :: class . java ). states ĊĠĠĠĠĠĠĠĠĠĠĠ Ġassert ( charge And Restriction State . size Ġ== Ġ 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġassert ( charge And Restriction State [ 0 ]. state . data . status Ġ== ĠD TC Consent Status . REQUEST _ TO _ ADD _ CON SENT _ FOR _ DIS CHAR GE ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` Request Ġfor Ġdis charge Ġshould Ġonly Ġbe Ġcreated Ġby Ġthe Ġsell er 's Ġcon vey ancer `() Ġ{ ĊĠĠĠĠĠĠĠ Ġ// ĠRequest Ġfor Ġdis charge Ġwith Ġwrong Ġcon vey ancer ĊĠĠĠĠĠĠĠ Ġassert Fails With < State NotFound On Vault Exception > Ġ{ Ġconsent For Dis charge ( buyer Convey ancer ) Ġ} ĊĠĠĠ Ġ} Ċ }