public void register(RegisterRequest request) {
        Optional<User> userOptional = userRepository.findByIdentificationNumber(request.getIdentificationNumber());
                if (userOptional.isPresent()) {
                    throw GenericException.builder()
                            .httpStatus(HttpStatus.BAD_REQUEST)
                            .logMessage(this.getClass().getName() + ".register user already exists with identification number {0}", request.getIdentificationNumber())
                            .message(ErrorCode.USER_ALREADY_EXISTS)
                            .build();
                }
        User user = User.builder().identificationNumber(request.getIdentificationNumber()).firstname(request.getFirstName()).lastname(request.getLastName()).password(passwordEncoder.encode(request.getPassword())).build();
        userRepository.save(user);
    }
@Test
    void register_userAlreadyExists() {
        // Arrange
        RegisterRequest request = new RegisterRequest("1234567890", "John", "Doe", "password");
        User existingUser = new User("1234567890", "John", "Doe", "encodedPassword");
        when(userRepository.findByIdentificationNumber(request.getIdentificationNumber())).thenReturn(Optional.of(existingUser));

        // Act & Assert
        assertThrows(GenericException.class, () -> userService.register(request));
        verify(userRepository, never()).save(any(User.class));
    }