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: USER_ID = randomUUID()
test_class.modifier: private static final
test_class.original_string: private static final UUID USER_ID = randomUUID();
test_class.type: UUID
test_class.var_name: USER_ID
test_class.declarator: PROFILE_PHOTO_FILE_ID = randomUUID()
test_class.modifier: private static final
test_class.original_string: private static final UUID PROFILE_PHOTO_FILE_ID = randomUUID();
test_class.type: UUID
test_class.var_name: PROFILE_PHOTO_FILE_ID
test_class.declarator: NEW_USER_EMAIL = "new-user-email"
test_class.modifier: private static final
test_class.original_string: private static final String NEW_USER_EMAIL = "new-user-email";
test_class.type: String
test_class.var_name: NEW_USER_EMAIL
test_class.declarator: NEW_USER_DISPLAY_NAME = "new-user-display-name"
test_class.modifier: private static final
test_class.original_string: private static final String NEW_USER_DISPLAY_NAME = "new-user-display-name";
test_class.type: String
test_class.var_name: NEW_USER_DISPLAY_NAME
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: defaultUsersService
test_class.modifier: private
test_class.original_string: private DefaultUsersService defaultUsersService;
test_class.type: DefaultUsersService
test_class.var_name: defaultUsersService
test_class.file: users/src/test/java/engineering/everest/lhotse/users/services/DefaultUsersServiceTest.java
test_class.identifier: DefaultUsersServiceTest
test_case.body: @Test
      void createNewUser_WillSendCommandAndWaitForCompletion() {
          when(passwordEncoder.encode("raw-password")).thenReturn("encoded-password");
  
          when(randomFieldsGenerator.genRandomUUID()).thenReturn(USER_ID);
  
          defaultUsersService.createUser(ADMIN_ID, ORGANIZATION_ID, NEW_USER_EMAIL, NEW_USER_DISPLAY_NAME, "raw-password");
  
          verify(commandGateway).sendAndWait(new CreateUserCommand(USER_ID, ORGANIZATION_ID, ADMIN_ID, NEW_USER_EMAIL, "encoded-password", NEW_USER_DISPLAY_NAME));
      }
test_case.class_method_signature: DefaultUsersServiceTest.createNewUser_WillSendCommandAndWaitForCompletion()
test_case.full_signature: @Test void createNewUser_WillSendCommandAndWaitForCompletion()
test_case.identifier: createNewUser_WillSendCommandAndWaitForCompletion
test_case.invocations: thenReturn when encode thenReturn when genRandomUUID createUser sendAndWait verify
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void createNewUser_WillSendCommandAndWaitForCompletion()
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: 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: 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: users/src/main/java/engineering/everest/lhotse/users/services/DefaultUsersService.java
focal_class.identifier: DefaultUsersService
focal_class.interfaces: implements UsersService
focal_class.class_method_signature: DefaultUsersService.DefaultUsersService(HazelcastCommandGateway commandGateway,
                                 RandomFieldsGenerator randomFieldsGenerator,
                                 PasswordEncoder passwordEncoder)
focal_class.full_signature: public  DefaultUsersService(HazelcastCommandGateway commandGateway,
                                 RandomFieldsGenerator randomFieldsGenerator,
                                 PasswordEncoder passwordEncoder)
focal_class.identifier: DefaultUsersService
focal_class.modifiers: public
focal_class.parameters: (HazelcastCommandGateway commandGateway,
                                 RandomFieldsGenerator randomFieldsGenerator,
                                 PasswordEncoder passwordEncoder)
focal_class.signature:  DefaultUsersService(HazelcastCommandGateway commandGateway,
                                 RandomFieldsGenerator randomFieldsGenerator,
                                 PasswordEncoder passwordEncoder)
focal_class.class_method_signature: DefaultUsersService.updateUser(UUID requestingUserId, UUID userId, String emailChange,
                             String displayNameChange, String passwordChange)
focal_class.full_signature: @Override public void updateUser(UUID requestingUserId, UUID userId, String emailChange,
                             String displayNameChange, String passwordChange)
focal_class.identifier: updateUser
focal_class.modifiers: @Override public
focal_class.parameters: (UUID requestingUserId, UUID userId, String emailChange,
                             String displayNameChange, String passwordChange)
focal_class.return: void
focal_class.signature: void updateUser(UUID requestingUserId, UUID userId, String emailChange,
                             String displayNameChange, String passwordChange)
focal_class.class_method_signature: DefaultUsersService.createUser(UUID requestingUserId, UUID organizationId, String username, String displayName, String rawPassword)
focal_class.full_signature: @Override public UUID createUser(UUID requestingUserId, UUID organizationId, String username, String displayName, String rawPassword)
focal_class.identifier: createUser
focal_class.modifiers: @Override public
focal_class.parameters: (UUID requestingUserId, UUID organizationId, String username, String displayName, String rawPassword)
focal_class.return: UUID
focal_class.signature: UUID createUser(UUID requestingUserId, UUID organizationId, String username, String displayName, String rawPassword)
focal_class.class_method_signature: DefaultUsersService.storeProfilePhoto(UUID requestingUserId, UUID profilePhotoFileId)
focal_class.full_signature: @Override public void storeProfilePhoto(UUID requestingUserId, UUID profilePhotoFileId)
focal_class.identifier: storeProfilePhoto
focal_class.modifiers: @Override public
focal_class.parameters: (UUID requestingUserId, UUID profilePhotoFileId)
focal_class.return: void
focal_class.signature: void storeProfilePhoto(UUID requestingUserId, UUID profilePhotoFileId)
focal_class.class_method_signature: DefaultUsersService.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 UUID createUser(UUID requestingUserId, UUID organizationId, String username, String displayName, String rawPassword) {
          return commandGateway.sendAndWait(new CreateUserCommand(randomFieldsGenerator.genRandomUUID(), organizationId, requestingUserId,
                  username, encodePasswordIfNotBlank(rawPassword), displayName));
      }
focal_method.class_method_signature: DefaultUsersService.createUser(UUID requestingUserId, UUID organizationId, String username, String displayName, String rawPassword)
focal_method.full_signature: @Override public UUID createUser(UUID requestingUserId, UUID organizationId, String username, String displayName, String rawPassword)
focal_method.identifier: createUser
focal_method.invocations: sendAndWait genRandomUUID encodePasswordIfNotBlank
focal_method.modifiers: @Override public
focal_method.parameters: (UUID requestingUserId, UUID organizationId, String username, String displayName, String rawPassword)
focal_method.return: UUID
focal_method.signature: UUID createUser(UUID requestingUserId, UUID organizationId, String username, String displayName, String rawPassword)