test_class.declarator: ORGANIZATION_ID = randomUUID()
test_class.modifier: private static final
test_class.original_string: private static final UUID ORGANIZATION_ID = randomUUID();
test_class.type: UUID
test_class.var_name: ORGANIZATION_ID
test_class.declarator: ORG_ADMIN_USER_ID = randomUUID()
test_class.modifier: private static final
test_class.original_string: private static final UUID ORG_ADMIN_USER_ID = randomUUID();
test_class.type: UUID
test_class.var_name: ORG_ADMIN_USER_ID
test_class.declarator: REGISTRATION_CONFIRMATION_CODE = randomUUID()
test_class.modifier: private static final
test_class.original_string: private static final UUID REGISTRATION_CONFIRMATION_CODE = randomUUID();
test_class.type: UUID
test_class.var_name: REGISTRATION_CONFIRMATION_CODE
test_class.declarator: ORG_ADMIN_RAW_PASSWORD = "raw-password"
test_class.modifier: private static final
test_class.original_string: private static final String ORG_ADMIN_RAW_PASSWORD = "raw-password";
test_class.type: String
test_class.var_name: ORG_ADMIN_RAW_PASSWORD
test_class.declarator: ORG_ADMIN_ENCODED_PASSWORD = "encoded-password"
test_class.modifier: private static final
test_class.original_string: private static final String ORG_ADMIN_ENCODED_PASSWORD = "encoded-password";
test_class.type: String
test_class.var_name: ORG_ADMIN_ENCODED_PASSWORD
test_class.declarator: ORG_ADMIN_EMAIL_ADDRESS_1 = "EmailAddress"
test_class.modifier: private static final
test_class.original_string: private static final String ORG_ADMIN_EMAIL_ADDRESS_1 = "EmailAddress";
test_class.type: String
test_class.var_name: ORG_ADMIN_EMAIL_ADDRESS_1
test_class.declarator: ORGANIZATION_NAME = "organization-name"
test_class.modifier: private static final
test_class.original_string: private static final String ORGANIZATION_NAME = "organization-name";
test_class.type: String
test_class.var_name: ORGANIZATION_NAME
test_class.declarator: ORGANIZATION_STREET_1 = "street-1"
test_class.modifier: private static final
test_class.original_string: private static final String ORGANIZATION_STREET_1 = "street-1";
test_class.type: String
test_class.var_name: ORGANIZATION_STREET_1
test_class.declarator: ORGANIZATION_CITY_1 = "city-1"
test_class.modifier: private static final
test_class.original_string: private static final String ORGANIZATION_CITY_1 = "city-1";
test_class.type: String
test_class.var_name: ORGANIZATION_CITY_1
test_class.declarator: ORGANIZATION_STATE_1 = "state-1"
test_class.modifier: private static final
test_class.original_string: private static final String ORGANIZATION_STATE_1 = "state-1";
test_class.type: String
test_class.var_name: ORGANIZATION_STATE_1
test_class.declarator: ORGANIZATION_COUNTRY_1 = "country-1"
test_class.modifier: private static final
test_class.original_string: private static final String ORGANIZATION_COUNTRY_1 = "country-1";
test_class.type: String
test_class.var_name: ORGANIZATION_COUNTRY_1
test_class.declarator: ORGANIZATION_POSTAL_CODE_1 = "postal-1"
test_class.modifier: private static final
test_class.original_string: private static final String ORGANIZATION_POSTAL_CODE_1 = "postal-1";
test_class.type: String
test_class.var_name: ORGANIZATION_POSTAL_CODE_1
test_class.declarator: ORGANIZATION_WEBSITE_URL_1 = "website-1"
test_class.modifier: private static final
test_class.original_string: private static final String ORGANIZATION_WEBSITE_URL_1 = "website-1";
test_class.type: String
test_class.var_name: ORGANIZATION_WEBSITE_URL_1
test_class.declarator: ORGANIZATION_CONTACT_NAME_1 = "contactName"
test_class.modifier: private static final
test_class.original_string: private static final String ORGANIZATION_CONTACT_NAME_1 = "contactName";
test_class.type: String
test_class.var_name: ORGANIZATION_CONTACT_NAME_1
test_class.declarator: ORGANIZATION_PHONE_NUMBER_1 = "phoneNumber"
test_class.modifier: private static final
test_class.original_string: private static final String ORGANIZATION_PHONE_NUMBER_1 = "phoneNumber";
test_class.type: String
test_class.var_name: ORGANIZATION_PHONE_NUMBER_1
test_class.declarator: randomFieldsGenerator
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private RandomFieldsGenerator randomFieldsGenerator;
test_class.type: RandomFieldsGenerator
test_class.var_name: randomFieldsGenerator
test_class.declarator: commandGateway
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private HazelcastCommandGateway commandGateway;
test_class.type: HazelcastCommandGateway
test_class.var_name: commandGateway
test_class.declarator: passwordEncoder
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private PasswordEncoder passwordEncoder;
test_class.type: PasswordEncoder
test_class.var_name: passwordEncoder
test_class.declarator: defaultPendingRegistrationsService
test_class.modifier: private
test_class.original_string: private DefaultPendingRegistrationsService defaultPendingRegistrationsService;
test_class.type: DefaultPendingRegistrationsService
test_class.var_name: defaultPendingRegistrationsService
test_class.file: pending-registrations/src/test/java/engineering/everest/lhotse/registrations/services/DefaultPendingRegistrationsServiceTest.java
test_class.identifier: DefaultPendingRegistrationsServiceTest
test_case.body: @Test
      void registeredOrganisation_WillSendCommandAndWaitForCompletion() {
          var expectedCommand = new RegisterOrganizationCommand(REGISTRATION_CONFIRMATION_CODE, ORGANIZATION_ID, ORG_ADMIN_USER_ID, ORG_ADMIN_EMAIL_ADDRESS_1, ORG_ADMIN_ENCODED_PASSWORD, ORGANIZATION_NAME,
                  ORGANIZATION_STREET_1, ORGANIZATION_CITY_1, ORGANIZATION_STATE_1, ORGANIZATION_COUNTRY_1, ORGANIZATION_POSTAL_CODE_1,
                  ORGANIZATION_WEBSITE_URL_1, ORGANIZATION_CONTACT_NAME_1, ORGANIZATION_PHONE_NUMBER_1);
  
          when(randomFieldsGenerator.genRandomUUID()).thenReturn(REGISTRATION_CONFIRMATION_CODE);
          when(commandGateway.sendAndWait(expectedCommand)).thenReturn(ORGANIZATION_ID);
          when(passwordEncoder.encode(ORG_ADMIN_RAW_PASSWORD)).thenReturn(ORG_ADMIN_ENCODED_PASSWORD);
  
          defaultPendingRegistrationsService.registerOrganization(ORGANIZATION_ID, ORG_ADMIN_USER_ID, ORGANIZATION_NAME, ORGANIZATION_STREET_1, ORGANIZATION_CITY_1, ORGANIZATION_STATE_1,
                  ORGANIZATION_COUNTRY_1, ORGANIZATION_POSTAL_CODE_1, ORGANIZATION_WEBSITE_URL_1, ORGANIZATION_CONTACT_NAME_1, ORGANIZATION_PHONE_NUMBER_1, ORG_ADMIN_EMAIL_ADDRESS_1, ORG_ADMIN_RAW_PASSWORD);
  
          verify(commandGateway).sendAndWait(expectedCommand);
      }
test_case.class_method_signature: DefaultPendingRegistrationsServiceTest.registeredOrganisation_WillSendCommandAndWaitForCompletion()
test_case.full_signature: @Test void registeredOrganisation_WillSendCommandAndWaitForCompletion()
test_case.identifier: registeredOrganisation_WillSendCommandAndWaitForCompletion
test_case.invocations: thenReturn when genRandomUUID thenReturn when sendAndWait thenReturn when encode registerOrganization sendAndWait verify
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void registeredOrganisation_WillSendCommandAndWaitForCompletion()
focal_class.declarator: randomFieldsGenerator
focal_class.modifier: private final
focal_class.original_string: private final RandomFieldsGenerator randomFieldsGenerator;
focal_class.type: RandomFieldsGenerator
focal_class.var_name: randomFieldsGenerator
focal_class.declarator: commandGateway
focal_class.modifier: private final
focal_class.original_string: private final HazelcastCommandGateway commandGateway;
focal_class.type: HazelcastCommandGateway
focal_class.var_name: commandGateway
focal_class.declarator: passwordEncoder
focal_class.modifier: private final
focal_class.original_string: private final PasswordEncoder passwordEncoder;
focal_class.type: PasswordEncoder
focal_class.var_name: passwordEncoder
focal_class.file: pending-registrations/src/main/java/engineering/everest/lhotse/registrations/services/DefaultPendingRegistrationsService.java
focal_class.identifier: DefaultPendingRegistrationsService
focal_class.interfaces: implements PendingRegistrationsService
focal_class.class_method_signature: DefaultPendingRegistrationsService.DefaultPendingRegistrationsService(RandomFieldsGenerator randomFieldsGenerator,
                                                HazelcastCommandGateway commandGateway,
                                                PasswordEncoder passwordEncoder)
focal_class.full_signature: public  DefaultPendingRegistrationsService(RandomFieldsGenerator randomFieldsGenerator,
                                                HazelcastCommandGateway commandGateway,
                                                PasswordEncoder passwordEncoder)
focal_class.identifier: DefaultPendingRegistrationsService
focal_class.modifiers: public
focal_class.parameters: (RandomFieldsGenerator randomFieldsGenerator,
                                                HazelcastCommandGateway commandGateway,
                                                PasswordEncoder passwordEncoder)
focal_class.signature:  DefaultPendingRegistrationsService(RandomFieldsGenerator randomFieldsGenerator,
                                                HazelcastCommandGateway commandGateway,
                                                PasswordEncoder passwordEncoder)
focal_class.class_method_signature: DefaultPendingRegistrationsService.registerOrganization(UUID organizationId, UUID userId, String organizationName, String street, String city,
                                       String state, String country, String postalCode, String websiteUrl, String contactName,
                                       String phoneNumber, String emailAddress, String contactRawPassword)
focal_class.full_signature: @Override public void registerOrganization(UUID organizationId, UUID userId, String organizationName, String street, String city,
                                       String state, String country, String postalCode, String websiteUrl, String contactName,
                                       String phoneNumber, String emailAddress, String contactRawPassword)
focal_class.identifier: registerOrganization
focal_class.modifiers: @Override public
focal_class.parameters: (UUID organizationId, UUID userId, String organizationName, String street, String city,
                                       String state, String country, String postalCode, String websiteUrl, String contactName,
                                       String phoneNumber, String emailAddress, String contactRawPassword)
focal_class.return: void
focal_class.signature: void registerOrganization(UUID organizationId, UUID userId, String organizationName, String street, String city,
                                       String state, String country, String postalCode, String websiteUrl, String contactName,
                                       String phoneNumber, String emailAddress, String contactRawPassword)
focal_class.class_method_signature: DefaultPendingRegistrationsService.confirmOrganizationRegistrationEmail(UUID organizationId, UUID confirmationCode)
focal_class.full_signature: @Override public void confirmOrganizationRegistrationEmail(UUID organizationId, UUID confirmationCode)
focal_class.identifier: confirmOrganizationRegistrationEmail
focal_class.modifiers: @Override public
focal_class.parameters: (UUID organizationId, UUID confirmationCode)
focal_class.return: void
focal_class.signature: void confirmOrganizationRegistrationEmail(UUID organizationId, UUID confirmationCode)
focal_class.class_method_signature: DefaultPendingRegistrationsService.encodePasswordIfNotBlank(String passwordChange)
focal_class.full_signature: private String encodePasswordIfNotBlank(String passwordChange)
focal_class.identifier: encodePasswordIfNotBlank
focal_class.modifiers: private
focal_class.parameters: (String passwordChange)
focal_class.return: String
focal_class.signature: String encodePasswordIfNotBlank(String passwordChange)
focal_method.body: @Override
      public void registerOrganization(UUID organizationId, UUID userId, String organizationName, String street, String city,
                                       String state, String country, String postalCode, String websiteUrl, String contactName,
                                       String phoneNumber, String emailAddress, String contactRawPassword) {
          commandGateway.sendAndWait(new RegisterOrganizationCommand(randomFieldsGenerator.genRandomUUID(), organizationId, userId,
                  emailAddress, encodePasswordIfNotBlank(contactRawPassword), organizationName, street, city, state, country,
                  postalCode, websiteUrl, contactName, phoneNumber));
      }
focal_method.class_method_signature: DefaultPendingRegistrationsService.registerOrganization(UUID organizationId, UUID userId, String organizationName, String street, String city,
                                       String state, String country, String postalCode, String websiteUrl, String contactName,
                                       String phoneNumber, String emailAddress, String contactRawPassword)
focal_method.full_signature: @Override public void registerOrganization(UUID organizationId, UUID userId, String organizationName, String street, String city,
                                       String state, String country, String postalCode, String websiteUrl, String contactName,
                                       String phoneNumber, String emailAddress, String contactRawPassword)
focal_method.identifier: registerOrganization
focal_method.invocations: sendAndWait genRandomUUID encodePasswordIfNotBlank
focal_method.modifiers: @Override public
focal_method.parameters: (UUID organizationId, UUID userId, String organizationName, String street, String city,
                                       String state, String country, String postalCode, String websiteUrl, String contactName,
                                       String phoneNumber, String emailAddress, String contactRawPassword)
focal_method.return: void
focal_method.signature: void registerOrganization(UUID organizationId, UUID userId, String organizationName, String street, String city,
                                       String state, String country, String postalCode, String websiteUrl, String contactName,
                                       String phoneNumber, String emailAddress, String contactRawPassword)