Review Request #12375 — Created June 15, 2022 and submitted
This splits up the test suite into a class per tested function, moves to
some modern assertion methods, and makes better use of spies.
This is in preparation for some new unit tests for fixes and
improvements to the caching support.
Unit tests pass.