}
private Integer createSavingsProduct(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,
final String minOpenningBalance, final String accountingRule, Account... accounts) {
System.out.println("------------------------------CREATING NEW SAVINGS PRODUCT ---------------------------------------");
SavingsProductHelper savingsProductHelper = new SavingsProductHelper();
if (accountingRule.equals(CASH_BASED)) {
savingsProductHelper = savingsProductHelper.withAccountingRuleAsCashBased(accounts);
} else if (accountingRule.equals(NONE)) {
savingsProductHelper = savingsProductHelper.withAccountingRuleAsNone();
}
final String savingsProductJSON = savingsProductHelper //
.withInterestCompoundingPeriodTypeAsDaily() //
.withInterestPostingPeriodTypeAsMonthly() //
.withInterestCalculationPeriodTypeAsDailyBalance() //
.withMinimumOpenningBalance(minOpenningBalance).build();
return SavingsProductHelper.createSavingsProduct(savingsProductJSON, requestSpec, responseSpec);