.next()
.invitationId();
for (int idx = 0; idx < 25; ++idx) {
User user =
ApplicationServiceRegistry
.identityApplicationService()
.registerUser(
new RegisterUserCommand(
tenant.tenantId().id(),
invitationId,
FIXTURE_USERNAME + idx,
FIXTURE_PASSWORD,
"Zoe",
"Doe",
true,
null,
null,
person.contactInformation().emailAddress().address(),
person.contactInformation().primaryTelephone().number(),
person.contactInformation().secondaryTelephone().number(),
person.contactInformation().postalAddress().streetAddress(),
person.contactInformation().postalAddress().city(),
person.contactInformation().postalAddress().stateProvince(),
person.contactInformation().postalAddress().postalCode(),
person.contactInformation().postalAddress().countryCode()));
if ((idx % 2) == 0) {
PersonNameChanged event =
new PersonNameChanged(
user.tenantId(),
user.username(),
user.person().name());
this.eventStore.append(event);
}
if ((idx % 3) == 0) {
UserPasswordChanged event =
new UserPasswordChanged(
user.tenantId(),
user.username());
this.eventStore.append(event);
}
DomainEventPublisher.instance().reset();