}
assertPayorsEqual(annuity.getPayors(), results.getPayors(),
"Annuity Payor from Client is not equal to DB value", "Mismacth was found.");
if (annuity.getPayors() != null) {
IPayor clientPayor = null;
for (int i=0; i<annuity.getPayors().size(); i++) {
found = false; // reset
clientPayor = annuity.getPayors().get(i);
for (IPayor resultPayor : results.getPayors()) {
if (clientPayor.getId().equals(resultPayor.getId())){
found = true;
assertEqual(annuity.getPayors().get(i), resultPayor,
"Annuity payor from Client is not equal to DB value at location: " +i , "Mismacth was found");
}else{
continue;
}
}
if (!(found) && clientPayor != null) {
throw new RuntimeException("Annuity: Payor from client is not equal to DB. " +
"Found payor with id: " + clientPayor.getId() +
" on the client side, but not in the database for annuity id:" + annuity.getId());
}
}
}