logoalt Hacker News

deepsunyesterday at 9:51 PM1 replyview on HN

Google API libraries mark every class as "final" so it's not trivial to mock-extend it for tests. But third-party IO is exactly the thing you'd want to mock.

Probably because they zealously followed "Effective Java" book.


Replies

wiseowiseyesterday at 10:33 PM

> But third-party IO is exactly the thing you'd want to mock.

You write an adapter.

show 2 replies