Code refactoring for InteractiveMaps tests