r/ProgrammerHumor • • Jul 18 '20

I also need help

/img/26u0ffsdfob51.png
8.5k Upvotes

224 comments sorted by

View all comments

Show parent comment

2

u/Ereaser Jul 19 '20

Ever heard of Mockito? It makes it as easy as it can be.

1

u/utdconsq Jul 19 '20

Yup, use it daily, but if things aren't written in a way suitable for mocking, you're out of luck. I've inherited some stuff that had no tests and adding them after the fact has been a challenge.

1

u/Ereaser Jul 19 '20

Ah yeah, that's especially the case for statics.

PowerMock can do that I believe, but I've never used it.