            (flaky-testcases-as-list {"passed-run-id" build-input-1
                                      "failed-run-id" build-input-1
                                      "another-failed-run-id" another-build-input-1}
-                                    (dummy-test-lookup {"passed-run-id" [(a-testsuite "a suite"
-                                                                                      (a-testcase "a class" "the testcase" :pass))
-                                                                         (a-testsuite "another suite"
-                                                                                      (a-testcase "another class" "another testcase" :pass))]
-                                                        "failed-run-id" [(a-testsuite "a suite"
-                                                                                      (a-testcase "a class" "the testcase" :fail))]
-                                                        "another-failed-run-id" [(a-testsuite "another suite"
-                                                                                              (a-testcase "another class" "another testcase" :fail))]}))))
+                                    (dummy-test-lookup {"passed-run-id" [(the-testcase :pass)
+                                                                         (another-testcase :pass)]
+                                                        "failed-run-id" [(the-testcase :fail)]
+                                                        "another-failed-run-id" [(another-testcase :fail)]}))))
     (is (= [{:testsuite ["a suite"]
              :classname "a class"
              :name "the testcase"

             :flaky-count 1}]
           (flaky-testcases-as-list {"passed-run-id" build-input-1
                                     "failed-run-id" another-build-input-1}
                                    (dummy-test-lookup {"passed-run-id" [(a-testsuite "a suite"
                                                                                      (a-testcase "a class" "the testcase" :pass))
                                                                         (a-testsuite "some suite"
                                                                                      (a-testcase "some class" "another testcase" :pass))]
                                                        "failed-run-id" [(a-testsuite "a suite"
                                                                                      (a-testcase "a class" "the testcase" :pass))
                                                                         (a-testsuite "some suite"
                                                                                      (a-testcase "some class" "another testcase" :fail))]}))))
    (is (= []
           (flaky-testcases-as-list {"failed-run-id" build-input-1}
                                    (dummy-test-lookup {"failed-run-id" [(a-testsuite "a suite"
                                                                                      (a-testcase "a class" "the testcase" :fail))]}))))
    (is (= []
           (flaky-testcases-as-list {"passed-run-id" build-input-2
                                     "failed-run-id" build-input-1}
                                    (dummy-test-lookup {"passed-run-id" [(a-testsuite "a suite"
                                                                                      (a-testcase "a class" "the testcase" :pass))]
                                                        "failed-run-id" [(a-testsuite "a suite"
                                                                                      (a-testcase "a class" "the testcase" :fail))]}))))
    (is (= [{:testsuite ["a suite"]
             :classname "a class"
             :name "the testcase"

           (flaky-testcases-as-list {"passed-run-id" build-input-1
                                     "failed-run-id" another-build-input-1
                                     "another-failed-run-id" build-input-2}
                                    (dummy-test-lookup {"passed-run-id" [(the-testcase :pass)
                                                                         (another-testcase :pass)]
                                                        "failed-run-id" [(the-testcase :fail)]
                                                        "another-failed-run-id" [(another-testcase :fail)]}))))
    (is (= [{:testsuite ["a suite"]
             :classname "a class"
             :name "the testcase"
             :build-id "failed-run-id"
             :latest-failure (:start build-input-1)
             :flaky-count 1}
            {:testsuite ["some suite"]
             :classname "some class"
             :name "another testcase"
             :build-id "another-failed-run-id"
             :latest-failure (:start another-build-input-1)
