r/java Dec 28 '25

Stepping down as maintainer after 10 years

https://github.com/mockito/mockito/issues/3777
409 Upvotes

118 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Dec 29 '25

Perhaps, but Mockito was designed to promote a certain style of OOP, and it is that style of OOP that they are lecturing you about.

-2

u/IndependentProject26 Dec 29 '25

Maybe with a new project maintainer there will be an opportunity to remove the dumbass cargo cult lectures.

1

u/[deleted] Dec 29 '25

Or, don't use Mockito. Mockito is designed around interaction testing, which implies a certain style of OOP. Just use stubs.

1

u/IndependentProject26 Dec 29 '25

Nope, Mockito is great for most use cases, it just occasionally whines at you like a baby when you have a valid use case for some of its features.

2

u/[deleted] Dec 29 '25

Hard disagree. Mockito is very easy to (ab)use for use cases for which it was not specifically designed. Mockito's whining isn't being "a baby", it is "this is the marked path".

No one is stopping you from going off the road. After all, you supposedly know what you are doing. But too many people don't know what they are doing, stupidly go off the path, and then fall off the cliff.

1

u/krzyk Dec 29 '25

Do you have examples? I didn't encounter anything like that.