Live data from Hacker News

Stepping down as Mockito maintainer after ten years

github.com

1–10 of 220 posts

Re: Stepping down as Mockito maintainer after ten years

#5
Sad to see an important project's core maintainer leave but their justification seems very understandable. It is sad so much of OSS is maintained by very few as they alluded to in the XKCD comment, an especially given they felt the JVM ecosystem was causing them pain with limited support or feedback possible. I think it is always a little irresponsible to cause a great deal of breakage and not be there to support those who you break downstream of your project.

Re: Stepping down as Mockito maintainer after ten years

#6
post #4

As someone who is not in the Java world, why does Java need a mocking library? Interface based polymorphism is not enough?

Arguably it doesn't. Mocking is over used and you should just use a real implementation or distributor provided fake whenever possible.

Re: Stepping down as Mockito maintainer after ten years

#8
>Mockito 5 shipped a breaking change where its main artifact is now an agent. That's because starting JVM 22, the previous so-called "dynamic attachment of agents" is put behind a flag

Wouldn't this hold back enterprise adoption, the same way breaking changes meant that Java 8 was widely used for a long time?

Re: Stepping down as Mockito maintainer after ten years

#9
post #4

As someone who is not in the Java world, why does Java need a mocking library? Interface based polymorphism is not enough?

Mockito allows one to write mocks in tests for code that doesn't use dependency injection and isn't properly testable in any other way.

On the one hand, you should just design things to be testable from the start. On the other... I'm already working in this codebase with 20 years of legacy untestable design...

Re: Stepping down as Mockito maintainer after ten years

#10
post #4

As someone who is not in the Java world, why does Java need a mocking library? Interface based polymorphism is not enough?

There are many cases where you don't control the library code your code depends on that you want to test. Also, the FactoryFactoryFactory patterns can be quite cumbersome and simply mocking out something makes for a far simpler test. There are likely more common cases.
Post reply on HN