From 58cd0fad5eaf04964d00cda87f2c3c647bccfe9e Mon Sep 17 00:00:00 2001 From: alexZ7000 <78627928+alexZ7000@users.noreply.github.com> Date: Fri, 11 Oct 2024 14:03:44 -0300 Subject: [PATCH] fix(UserServiceTest): mocking PasswordEncoder --- .../com/example/comerce/core/services/UserServiceTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/java/com/example/comerce/core/services/UserServiceTest.java b/src/test/java/com/example/comerce/core/services/UserServiceTest.java index 378a2cb..6b2e85d 100644 --- a/src/test/java/com/example/comerce/core/services/UserServiceTest.java +++ b/src/test/java/com/example/comerce/core/services/UserServiceTest.java @@ -15,6 +15,7 @@ import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; +import org.springframework.security.crypto.password.PasswordEncoder; import java.util.Date; import java.util.List; @@ -39,6 +40,9 @@ final class UserServiceTest { @Mock private AuthenticationManager authenticationManager; + @Mock + private PasswordEncoder passwordEncoder; + private UserDTO userDTO; private User user; private UUID userId;