New Blog Post: Mocking Static Code Without a Library

New post on Frame/work! Nextworld superstar Brendan Boyd walks through a pattern the team built when our mocking library was deprecated and 13,000 files of static Java code needed a new testing strategy: Mocking Static Code Without a Mocking Library

The idea: convert static utilities to singletons, then swap the singleton with a stub at runtime. No new library. No codebase rewrite. The post covers the pattern, how to harden it, and the tradeoffs you should know about before adopting it.

If you’ve ever stared down a wall of untestable static code, give it a read!

1 Like