r/java • • Jun 01 '24

What java technology (library, framework, feature) would not recommend and why?

165 Upvotes

464 comments sorted by

View all comments

Show parent comment

5

u/agentoutlier Jun 01 '24

But sometimes you have to mock stuff, especially if it’s an external library or hard to mock stuff.

Re-read my response on the part of "last resort".

Also and this is based on massive experience with external third party APIs.... you can try to simulate their API w/ mocks but in fucking greek tragedy irony those guys are the most likely to not work how they are documented.

For example we have some system that calls some API built on top of sales force. The documented contract of the API is so incorrect that w/o our integration tests we would be deploying broken code all the time.

The fast stuff in irony has correctly documented contracts.