I am mocking a object using @Mock annotation
@Mock Customer customer;
but the @Mock annotation is showing warning
The type MockitoAnnotations.Mock is deprecated
and my test case is failed
Advertisement
Answer
You are using the wrong mock. Try using the below one
org.mockito.Mock instead of org.mockito.MockitoAnnotations.Mock