Adapt insert mode unit test infrastructure for recent changes