Why Mockito?

A Testing Tool

Kayathiri Mahendrakumaran
Geek Culture
Published in
4 min readNov 11, 2022

--

Photo by Tolga Ulkan on Unsplash

Mock.. PowerMock..

We may have came across these terms while writing tests for our code base. In unit testing, we wish to test a class’s functions separately. But generally, the classes are not independent. One class will invoke methods of another class. So, it is hard to test a single class.

  • Some of the external service we use may not properly work in the testing…

--

--

Kayathiri Mahendrakumaran
Geek Culture

Senior Software Engineer 👨‍💻, WSO2 | Undergraduate👩‍🎓 , Computer Science & Engineering | Writer ✍️