@Test public void testHandleCreateAccountPayable() throws Exception { CreateAccountPayableFeeCommand command = new CreateAccountPayableFeeCommand( feeTransactionId, payableFeeId, FeeStatus.PENDING, sellCommissionAmount, FeeType.RECEIVE_MONEY, BusinessType.TRADE_EXECUTED, tradeTime, dueDate, portfolioId.toString(), userId.toString(), orderTransactionId.toString()); payableFixture.given() .when(command) .expectEvents( new AccountPayableFeeCreatedEvent( payableFeeId, FeeStatus.PENDING, sellCommissionAmount, FeeType.RECEIVE_MONEY, tradeTime, dueDate, portfolioId.toString(), userId.toString(), BusinessType.TRADE_EXECUTED, orderTransactionId.toString())); }
@CommandHandler public void handleCreateAccountPayable(CreateAccountPayableFeeCommand command) { accountPayableFeeRepository.add(new AccountPayableFee( command.getFeeId(), command.getFeeStatus(), command.getAmount(), command.getFeeType(), command.getDueDate(), command.getCreatedTime(), command.getPortfolioId(), command.getUserId(), command.getBusinessType(), command.getBusinessReferenceId() )); }
ReceivablePayableCommandHandler { @CommandHandler public void handleCreateAccountPayable(CreateAccountPayableFeeCommand command) { accountPayableFeeRepository.add(new AccountPayableFee( command.getFeeId(), command.getFeeStatus(), command.getAmount(), command.getFeeType(), command.getDueDate(), command.getCreatedTime(), command.getPortfolioId(), command.getUserId(), command.getBusinessType(), command.getBusinessReferenceId() )); } }
ReceivablePayableCommandHandler { @CommandHandler public void handleCreateAccountPayable(CreateAccountPayableFeeCommand command) { accountPayableFeeRepository.add(new AccountPayableFee( command.getFeeId(), command.getFeeStatus(), command.getAmount(), command.getFeeType(), command.getDueDate(), command.getCreatedTime(), command.getPortfolioId(), command.getUserId(), command.getBusinessType(), command.getBusinessReferenceId() )); }  }
ReceivablePayableCommandHandler { @CommandHandler public void handleCreateAccountPayable(CreateAccountPayableFeeCommand command) { accountPayableFeeRepository.add(new AccountPayableFee( command.getFeeId(), command.getFeeStatus(), command.getAmount(), command.getFeeType(), command.getDueDate(), command.getCreatedTime(), command.getPortfolioId(), command.getUserId(), command.getBusinessType(), command.getBusinessReferenceId() )); }  @CommandHandler void handleCreateAccountReceivable(CreateAccountReceivableFeeCommand command); @CommandHandler void handleConfirmAccountReceivable(ConfirmAccountReceivableFeeCommand command); @CommandHandler void handleOffsetAccountReceivable(OffsetAccountReceivableFeeCommand command); @CommandHandler void handleCancelAccountReceivable(CancelAccountReceivableFeeCommand command); @CommandHandler void handleCreateAccountPayable(CreateAccountPayableFeeCommand command); @CommandHandler void handleConfirmAccountPayable(ConfirmAccountPayableFeeCommand command); @CommandHandler void handleOffsetAccountPayable(OffsetAccountPayableFeeCommand command); @CommandHandler void handleCancelAccountPayable(CancelAccountPayableFeeCommand command); @Resource(name = "accountReceivableFeeRepository") void setAccountReceivableFeeRepository(Repository<AccountReceivableFee> accountReceivableFeeRepository); @Resource(name = "accountReceivableFeeRepository") void setAccountPayableFeeRepository(Repository<AccountPayableFee> accountPayableFeeRepository); }
ReceivablePayableCommandHandler { @CommandHandler public void handleCreateAccountPayable(CreateAccountPayableFeeCommand command) { accountPayableFeeRepository.add(new AccountPayableFee( command.getFeeId(), command.getFeeStatus(), command.getAmount(), command.getFeeType(), command.getDueDate(), command.getCreatedTime(), command.getPortfolioId(), command.getUserId(), command.getBusinessType(), command.getBusinessReferenceId() )); }  @CommandHandler void handleCreateAccountReceivable(CreateAccountReceivableFeeCommand command); @CommandHandler void handleConfirmAccountReceivable(ConfirmAccountReceivableFeeCommand command); @CommandHandler void handleOffsetAccountReceivable(OffsetAccountReceivableFeeCommand command); @CommandHandler void handleCancelAccountReceivable(CancelAccountReceivableFeeCommand command); @CommandHandler void handleCreateAccountPayable(CreateAccountPayableFeeCommand command); @CommandHandler void handleConfirmAccountPayable(ConfirmAccountPayableFeeCommand command); @CommandHandler void handleOffsetAccountPayable(OffsetAccountPayableFeeCommand command); @CommandHandler void handleCancelAccountPayable(CancelAccountPayableFeeCommand command); @Resource(name = "accountReceivableFeeRepository") void setAccountReceivableFeeRepository(Repository<AccountReceivableFee> accountReceivableFeeRepository); @Resource(name = "accountReceivableFeeRepository") void setAccountPayableFeeRepository(Repository<AccountPayableFee> accountPayableFeeRepository);  }