package Ġcom . r 3 . ref app . it . reports Ċ Ċ import Ġcom . r 3 . ref app . flows . reports . Get Transactions Pag inated Flow Ċ import Ġcom . r 3 . ref app . repositories . Repository QueryParams Ċ import Ġcom . r 3 . ref app . schemas . Transaction Type Ċ import Ġcom . r 3 . ref app . test . utils . Abstract IT Helper Ċ import Ġcom . r 3 . ref app . test . utils . TestUtils . execute Flow With Run Network Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġjava . time . Instant Ċ import Ġjava . util . concurrent . ExecutionException Ċ import Ġkotlin . test . assertEquals Ċ import Ġkotlin . test . assert Fails With Ċ Ċ class ĠGet Transactions Pag inated Flow Test Ġ: ĠAbstract IT Helper () Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` test ĠGet Transactions Pag inated Flow Ġhappy Ġpath `() Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġrepository QueryParams Ġ= ĠRepository QueryParams ( 1 , Ġ 5 , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnull , ĠRepository QueryParams . SortOrder . DESC , Ġ"") ĊĠĠĠĠĠĠĠ Ġval Ġaccounts Ġ= Ġprepare Transactions () ĊĊĠĠĠĠĠĠĠ Ġval Ġresponse Ġ= Ġexecute Flow With Run Network ( Get Transactions Pag inated Flow ( repository QueryParams , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnull , Ġnull ), Ġbank , Ġnetwork ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( 5 , Ġresponse . pageSize ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 4 , Ġresponse . total Results ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġresponse . total Pages ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġresponse . pageNumber ) ĊĊĠĠĠĠĠĠĠ ĠassertEquals ( 4 , Ġresponse . result . count ()) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 2 , Ġresponse . result . count Ġ{ Ġit . tx Type Ġ== ĠTransaction Type . DE POSIT Ġ}) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġresponse . result . count Ġ{ Ġit . tx Type Ġ== ĠTransaction Type . WITH DRAW AL Ġ}) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġresponse . result . count Ġ{ Ġit . tx Type Ġ== ĠTransaction Type . TRANSFER Ġ}) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġresponse . result . count Ġ{ Ġit . account From Ġ== Ġaccounts [ 0 ]. account Data . accountId Ġ}) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġresponse . result . count Ġ{ Ġit . account From Ġ== Ġaccounts [ 1 ]. account Data . accountId Ġ}) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 0 , Ġresponse . result . count Ġ{ Ġit . account From Ġ== Ġaccounts [ 2 ]. account Data . accountId Ġ}) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġresponse . result . count Ġ{ Ġit . account To Ġ== Ġaccounts [ 0 ]. account Data . accountId Ġ}) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġresponse . result . count Ġ{ Ġit . account To Ġ== Ġaccounts [ 1 ]. account Data . accountId Ġ}) ĊĠĠĠĠĠĠĠ ĠassertEquals ( 1 , Ġresponse . result . count Ġ{ Ġit . account To Ġ== Ġaccounts [ 2 ]. account Data . accountId Ġ}) ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` test ĠGet Transactions Pag inated Flow Ġfails Ġwith Ġun existent Ġsort Ġcolumn `() Ġ{ ĊĊĠĠĠĠĠĠĠ Ġval Ġrepository QueryParams Ġ= ĠRepository QueryParams ( 1 , Ġ 5 , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ" test test ", ĠRepository QueryParams . SortOrder . ASC , Ġ"") ĊĊĠĠĠĠĠĠĠ Ġval Ġmessage Ġ= Ġassert Fails With < ExecutionException > Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġexecute Flow With Run Network ( Get Transactions Pag inated Flow ( repository QueryParams , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠInstant . now (). minus Seconds ( 1 0 ), ĠInstant . now ()), Ġbank , Ġnetwork ) ĊĠĠĠĠĠĠĠ Ġ}. message !! ĊĠĠĠĠĠĠĠ ĠassertEquals (" java . lang . IllegalArgumentException : ĠInvalid Ġsort Ġfield Ġtest test ", Ġmessage ) ĊĠĠĠ Ġ} Ċ }