Refactored connnection string switcher to be testable