                                            content))]])
 
 (defn- a-file-list [pipeline-name pipeline-run stage-name stage-run build-name & files]
-  [[(format "http://gocd:8513/files/%s/%s/%s/%s/%s.json" pipeline-name pipeline-run stage-name stage-run build-name)
-    (successful-json-response [{:name "a_folder"
-                                :files files}])]])
+  [[(format "http://gocd:8513/files/%s/%s/%s/%s/%s.json"
+            pipeline-name pipeline-run stage-name stage-run build-name)
+    (successful-json-response files)]])
+
+(defn- a-file [pipeline-name pipeline-run stage-name stage-run build-name file-path content]
+  [[(format "http://gocd:8513/files/%s/%s/%s/%s/%s/%s"
+            pipeline-name pipeline-run stage-name stage-run build-name file-path)
+    (successful-response content)]])
 
 (defn- provide-buildviz-and-capture-puts [map-ref]
-  [[#"http://buildviz:8010/builds/(.+)/(.+)"
+  [[#"http://buildviz:8010/builds/(.+)/(.+)/testresults"
+    (fn [req]
+      (swap! map-ref #(conj % [(:uri req)
+                               (slurp (:body req))]))
+      {:status 200 :body ""})]
+   [#"http://buildviz:8010/builds/(.+)/(.+)"
     (fn [req]
       (swap! map-ref #(conj % [(:uri req)
                                (j/parse-string (slurp (:body req)) true)]))

                                       (url/url "http://buildviz:8010")
                                       beginning-of-2016 nil nil)))
      (is (= ["/builds/Build%20SomeMore/42%201"]
             (map first @store))))))

                                       beginning-of-2016 nil nil)))
      (is (empty? @store))))

  (testing "should only sync stage of pipeline that's after the sync date offset"
    (let [store (atom [])]
      (fake/with-fake-routes-in-isolation
        (serve-up (a-config (a-pipeline-group "Development"
