}
assertRidersEqual(annuity.getRiders(), results.getRiders(),
"Annuity rider from Client is not equal to DB value", "Mismacth was found in number of rider");
if (annuity.getRiders() != null) {
IRider clientRider = null;
for (int i=0; i<annuity.getRiders().size(); i++) {
found = false; // reset
clientRider = annuity.getRiders().get(i);
for (IRider resultRider : results.getRiders()) {
if (clientRider.getId().equals(resultRider.getId())){
found = true;
assertEqual(clientRider, resultRider,
"Annuity rider from Client is not equal to DB value at location: " +i , "Mismacth was found");
}else{
continue;
}
}
if (!(found) && clientRider != null) {
throw new RuntimeException("Annuity: Rider from client is not equal to DB. " +
"Found rider with id: " + clientRider.getId() +
" on the client side, but not in the database for annuity id:" + annuity.getId());
}
}
}