This commit rewrites the test to use an in-memory database rather than the deprecated Map-based arrangement. Closes gh-23369