Inline method for decoupling. Not used anywhere else yet.
Tests for map factory.