@Test void onOrganizationRegistrationReceived_WillDelegateToRepository() { var organizationRegistrationReceivedEvent = new OrganizationRegistrationReceivedEvent(ORGANIZATION_ID, REGISTERING_USER_ID, REGISTRATION_CONFIRMATION_CODE, CONTACT_EMAIL, ENCODED_PASSWORD, ORGANIZATION_NAME, WEBSITE_URL, STREET, CITY, STATE, COUNTRY, POSTAL_CODE, CONTACT_NAME, CONTACT_PHONE_NUMBER); pendingRegistrationsEventHandler.on(organizationRegistrationReceivedEvent, REGISTRATION_RECEIVED_TIME); verify(pendingRegistrationsRepository).createPendingRegistration(REGISTRATION_CONFIRMATION_CODE, ORGANIZATION_ID, REGISTERING_USER_ID, CONTACT_EMAIL, REGISTRATION_RECEIVED_TIME); }
@EventHandler void on(OrganizationRegistrationReceivedEvent event, @Timestamp Instant registrationReceivedTime) { LOGGER.info("Creating pending registration for organization {}", event.getOrganizationId()); pendingRegistrationsRepository.createPendingRegistration(event.getRegistrationConfirmationCode(), event.getOrganizationId(), event.getRegisteringUserId(), event.getRegisteringContactEmail(), registrationReceivedTime); }
PendingRegistrationsEventHandler implements ReplayCompletionAware { @EventHandler void on(OrganizationRegistrationReceivedEvent event, @Timestamp Instant registrationReceivedTime) { LOGGER.info("Creating pending registration for organization {}", event.getOrganizationId()); pendingRegistrationsRepository.createPendingRegistration(event.getRegistrationConfirmationCode(), event.getOrganizationId(), event.getRegisteringUserId(), event.getRegisteringContactEmail(), registrationReceivedTime); } }
PendingRegistrationsEventHandler implements ReplayCompletionAware { @EventHandler void on(OrganizationRegistrationReceivedEvent event, @Timestamp Instant registrationReceivedTime) { LOGGER.info("Creating pending registration for organization {}", event.getOrganizationId()); pendingRegistrationsRepository.createPendingRegistration(event.getRegistrationConfirmationCode(), event.getOrganizationId(), event.getRegisteringUserId(), event.getRegisteringContactEmail(), registrationReceivedTime); } PendingRegistrationsEventHandler(PendingRegistrationsRepository pendingRegistrationsRepository); }
PendingRegistrationsEventHandler implements ReplayCompletionAware { @EventHandler void on(OrganizationRegistrationReceivedEvent event, @Timestamp Instant registrationReceivedTime) { LOGGER.info("Creating pending registration for organization {}", event.getOrganizationId()); pendingRegistrationsRepository.createPendingRegistration(event.getRegistrationConfirmationCode(), event.getOrganizationId(), event.getRegisteringUserId(), event.getRegisteringContactEmail(), registrationReceivedTime); } PendingRegistrationsEventHandler(PendingRegistrationsRepository pendingRegistrationsRepository); @ResetHandler void prepareForReplay(); }
PendingRegistrationsEventHandler implements ReplayCompletionAware { @EventHandler void on(OrganizationRegistrationReceivedEvent event, @Timestamp Instant registrationReceivedTime) { LOGGER.info("Creating pending registration for organization {}", event.getOrganizationId()); pendingRegistrationsRepository.createPendingRegistration(event.getRegistrationConfirmationCode(), event.getOrganizationId(), event.getRegisteringUserId(), event.getRegisteringContactEmail(), registrationReceivedTime); } PendingRegistrationsEventHandler(PendingRegistrationsRepository pendingRegistrationsRepository); @ResetHandler void prepareForReplay();  }