Need to write two Junit tests independently for the particular service.
- If the variable "groupInOneTransaction" passed to the service.
- "groupInOneTransaction" is not passed to the service.
For the first part check for the all payments are associated with the particular FinAccountTrans Id, and the amount should be total of the amount of the all paymentIds passed to the service.
For the second test test the all amount in the payment and finAccountTrans are equal and paymentId is in the finAccountTrans record or not.