@SuppressWarnings("unchecked")
@Test
public void testLoadProduct() {

    Integer productId = 1;
    List<ListElement> interestCalculationOptions  = new ArrayList<ListElement>();
    boolean groupSavingsAccount = false;
    Integer depositType = 1;
    Integer groupSavingsType = 1;
    Double amountForDeposit = 10.0;
    Double maxWithdrawal = 100.0;
    BigDecimal interestRate = new BigDecimal("5.0");
    Integer interestCalculationType = 1;
    Integer interestCalculationFrequency = 1;
    Integer interestCalculationFrequencyPeriod = 1;
    Integer interestPostingMonthlyFrequency = 1;
    BigDecimal minBalanceForInterestCalculation = new BigDecimal("1.0");
    Integer depositGlCode = 1;
    Integer interestGlCode = 1;
    ProductDetailsDto productsDetailDto = null;
    SavingsProductDto savingsProductDetails = new SavingsProductDto(productsDetailDto, groupSavingsAccount, 
            depositType, groupSavingsType, amountForDeposit, maxWithdrawal, interestRate, interestCalculationType, 
            interestCalculationFrequency, interestCalculationFrequencyPeriod, interestPostingMonthlyFrequency, 
            minBalanceForInterestCalculation, depositGlCode, interestGlCode, false);
    SavingsProductReferenceDto savingsProductReference = new SavingsProductReferenceDto(
            interestCalculationOptions, savingsProductDetails, true);
    
    when(savingsServiceFacade.retrieveSavingsProductReferenceData(productId)).thenReturn(savingsProductReference);
    
    controller.loadProduct(productId, formBean);
    
    verify(formBean).setProductId(productId);
    verify(formBean).setProduct(savingsProductReference);
    verify(formBean).setMandatoryDepositAmount(any(String.class));
    verify(formBean).setSavingsTypes(any(Map.class));
    verify(formBean).setRecurrenceTypes(any(Map.class));
    verify(formBean).setRecurrenceFrequencies(any(Map.class));
}