@Test void onUserCreatedByAdminEvent_WillDelegate() { usersEventHandler.on(new UserCreatedByAdminEvent(USER_ID, ORGANIZATION_ID, ADMIN_ID, USER_DISPLAY_NAME, USER_USERNAME, ENCODED_PASSWORD), CREATION_TIME); verify(usersRepository).createUser(USER_ID, ORGANIZATION_ID, USER_DISPLAY_NAME, USER_USERNAME, ENCODED_PASSWORD, CREATION_TIME); }
@EventHandler void on(UserCreatedByAdminEvent event, @Timestamp Instant creationTime) { LOGGER.info("User {} created for admin created organization {}", event.getUserId(), event.getOrganizationId()); usersRepository.createUser(event.getUserId(), event.getOrganizationId(), event.getUserDisplayName(), event.getUserEmail(), event.getEncodedPassword(), creationTime); }
UsersEventHandler implements ReplayCompletionAware { @EventHandler void on(UserCreatedByAdminEvent event, @Timestamp Instant creationTime) { LOGGER.info("User {} created for admin created organization {}", event.getUserId(), event.getOrganizationId()); usersRepository.createUser(event.getUserId(), event.getOrganizationId(), event.getUserDisplayName(), event.getUserEmail(), event.getEncodedPassword(), creationTime); } }
UsersEventHandler implements ReplayCompletionAware { @EventHandler void on(UserCreatedByAdminEvent event, @Timestamp Instant creationTime) { LOGGER.info("User {} created for admin created organization {}", event.getUserId(), event.getOrganizationId()); usersRepository.createUser(event.getUserId(), event.getOrganizationId(), event.getUserDisplayName(), event.getUserEmail(), event.getEncodedPassword(), creationTime); } @Autowired  UsersEventHandler(UsersRepository usersRepository); }
UsersEventHandler implements ReplayCompletionAware { @EventHandler void on(UserCreatedByAdminEvent event, @Timestamp Instant creationTime) { LOGGER.info("User {} created for admin created organization {}", event.getUserId(), event.getOrganizationId()); usersRepository.createUser(event.getUserId(), event.getOrganizationId(), event.getUserDisplayName(), event.getUserEmail(), event.getEncodedPassword(), creationTime); } @Autowired  UsersEventHandler(UsersRepository usersRepository); @ResetHandler void prepareForReplay(); }
UsersEventHandler implements ReplayCompletionAware { @EventHandler void on(UserCreatedByAdminEvent event, @Timestamp Instant creationTime) { LOGGER.info("User {} created for admin created organization {}", event.getUserId(), event.getOrganizationId()); usersRepository.createUser(event.getUserId(), event.getOrganizationId(), event.getUserDisplayName(), event.getUserEmail(), event.getEncodedPassword(), creationTime); } @Autowired  UsersEventHandler(UsersRepository usersRepository); @ResetHandler void prepareForReplay();  }