component-test/src/main/java/org/apache/fineract/cn/deposit/TestAccrual.java [67:95]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    super.depositAccountManager.create(productDefinition);
    super.eventRecorder.wait(EventConstants.POST_PRODUCT_DEFINITION, productDefinition.getIdentifier());

    final ProductDefinitionCommand productDefinitionCommand = new ProductDefinitionCommand();
    productDefinitionCommand.setAction(ProductDefinitionCommand.Action.ACTIVATE.name());
    super.depositAccountManager.process(productDefinition.getIdentifier(), productDefinitionCommand);
    super.eventRecorder.wait(EventConstants.POST_PRODUCT_DEFINITION_COMMAND, productDefinition.getIdentifier());

    final ProductInstance productInstance = Fixture.productInstance(productDefinition.getIdentifier());
    super.depositAccountManager.create(productInstance);
    super.eventRecorder.wait(EventConstants.POST_PRODUCT_INSTANCE, productInstance.getCustomerIdentifier());

    final List<ProductInstance> productInstances = super.depositAccountManager.findProductInstances(productDefinition.getIdentifier());
    Assert.assertNotNull(productInstances);
    Assert.assertEquals(1, productInstances.size());
    final ProductInstance foundProductInstance = productInstances.get(0);

    super.depositAccountManager.postProductInstanceCommand(
        foundProductInstance.getAccountIdentifier(), EventConstants.ACTIVATE_PRODUCT_INSTANCE_COMMAND);
    super.eventRecorder.wait(EventConstants.ACTIVATE_PRODUCT_INSTANCE, foundProductInstance.getAccountIdentifier());

    final Account shareAccount = new Account();
    shareAccount.setType(AccountType.EQUITY.name());
    shareAccount.setIdentifier(foundProductInstance.getAccountIdentifier());
    shareAccount.setBalance(1000.00D);

    Mockito
        .doAnswer(invocation -> shareAccount)
        .when(super.accountingServiceSpy).findAccount(shareAccount.getIdentifier());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



component-test/src/main/java/org/apache/fineract/cn/deposit/TestDividendDistribution.java [49:77]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    super.depositAccountManager.create(productDefinition);
    super.eventRecorder.wait(EventConstants.POST_PRODUCT_DEFINITION, productDefinition.getIdentifier());

    final ProductDefinitionCommand productDefinitionCommand = new ProductDefinitionCommand();
    productDefinitionCommand.setAction(ProductDefinitionCommand.Action.ACTIVATE.name());
    super.depositAccountManager.process(productDefinition.getIdentifier(), productDefinitionCommand);
    super.eventRecorder.wait(EventConstants.POST_PRODUCT_DEFINITION_COMMAND, productDefinition.getIdentifier());

    final ProductInstance productInstance = Fixture.productInstance(productDefinition.getIdentifier());
    super.depositAccountManager.create(productInstance);
    super.eventRecorder.wait(EventConstants.POST_PRODUCT_INSTANCE, productInstance.getCustomerIdentifier());

    final List<ProductInstance> productInstances = super.depositAccountManager.findProductInstances(productDefinition.getIdentifier());
    Assert.assertNotNull(productInstances);
    Assert.assertEquals(1, productInstances.size());
    final ProductInstance foundProductInstance = productInstances.get(0);

    super.depositAccountManager.postProductInstanceCommand(
        foundProductInstance.getAccountIdentifier(), EventConstants.ACTIVATE_PRODUCT_INSTANCE_COMMAND);
    super.eventRecorder.wait(EventConstants.ACTIVATE_PRODUCT_INSTANCE, foundProductInstance.getAccountIdentifier());

    final Account shareAccount = new Account();
    shareAccount.setType(AccountType.EQUITY.name());
    shareAccount.setIdentifier(foundProductInstance.getAccountIdentifier());
    shareAccount.setBalance(1000.00D);

    Mockito
        .doAnswer(invocation -> shareAccount)
        .when(super.accountingServiceSpy).findAccount(shareAccount.getIdentifier());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



