Use mock for fake connections and patching of libs