-1

I've been trying to understand how Mockito mocking works. I've read various responses and there seems to be a conflicting argument whether Mockito uses reflection internally or not.

Here, it clearly says that mockito does not use Reflection: https://stackoverflow.com/questions/15970810/using-mockito-to-mock-methods-by-reflection#:~:text=Mockito%20is%20a%20really%20well,easy%20to%20read%20and%20understand.

On the other hand, the most popular tutorial website says otherwise in the very first line under Mockito: https://www.tutorialspoint.com/mockito/mockito_overview.htm

I'm slightly confused with what's true about mocking with Mockito.

saran3h
  • 12,353
  • 4
  • 42
  • 54

1 Answers1

0

Mockito uses the reflection internally. You can check it out this source code also on Mockito Git Library.

Gaurav Jeswani
  • 4,410
  • 6
  • 26
  • 47