source: class UserServiceTest {
  
      @Autowired
      private UserService userService;
      @Autowired
      private UserRepository userRepository;
      @Autowired
      private AuthorityRepository authorityRepository;
  
      @Test
      public void whenSendValidPasswordResetKey() {
  
target:         User user = this.createUser();
          user.setActivated(true);
          user.setResetKey("12345678910111213141");
          this.userRepository.save(user);
          Optional<User> result = this.userService.completePasswordReset("testtest", user.getResetKey());
          assertTrue(result.isPresent());
      }
  
  }