@Test public void testHandleConfirmAccountReceivable() throws Exception { ConfirmAccountReceivableFeeCommand command = new ConfirmAccountReceivableFeeCommand(receivableFeeId, tradeTime); receivableFixture.given( new AccountReceivableFeeCreatedEvent( receivableFeeId, FeeStatus.PENDING, sellCommissionAmount, FeeType.RECEIVE_MONEY, tradeTime, dueDate, portfolioId.toString(), userId.toString(), BusinessType.TRADE_EXECUTED, orderTransactionId.toString())) .when(command) .expectEvents( new AccountReceivableFeeConfirmedEvent( receivableFeeId, tradeTime)); }
@CommandHandler public void handleConfirmAccountReceivable(ConfirmAccountReceivableFeeCommand command) { AccountReceivableFee fee = accountReceivableFeeRepository.load(command.getFeeId()); fee.confirm(command.getConfirmedDate()); }
ReceivablePayableCommandHandler { @CommandHandler public void handleConfirmAccountReceivable(ConfirmAccountReceivableFeeCommand command) { AccountReceivableFee fee = accountReceivableFeeRepository.load(command.getFeeId()); fee.confirm(command.getConfirmedDate()); } }
ReceivablePayableCommandHandler { @CommandHandler public void handleConfirmAccountReceivable(ConfirmAccountReceivableFeeCommand command) { AccountReceivableFee fee = accountReceivableFeeRepository.load(command.getFeeId()); fee.confirm(command.getConfirmedDate()); }  }
ReceivablePayableCommandHandler { @CommandHandler public void handleConfirmAccountReceivable(ConfirmAccountReceivableFeeCommand command) { AccountReceivableFee fee = accountReceivableFeeRepository.load(command.getFeeId()); fee.confirm(command.getConfirmedDate()); }  @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 handleConfirmAccountReceivable(ConfirmAccountReceivableFeeCommand command) { AccountReceivableFee fee = accountReceivableFeeRepository.load(command.getFeeId()); fee.confirm(command.getConfirmedDate()); }  @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);  }