              :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))]
-                                                        "failed-run-id" [(a-testsuite "a suite"
-                                                                                      (a-testcase "a class" "the testcase" :error))]}))))
+                                    (dummy-test-lookup {"passed-run-id" [(the-testcase :pass)]
+                                                        "failed-run-id" [(the-testcase :error)]}))))
     (is (= []
            (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))]
-                                                        "failed-run-id" [(a-testsuite "a suite"
-                                                                                      (a-testcase "a class" "the testcase" :pass))]}))))
+                                    (dummy-test-lookup {"passed-run-id" [(the-testcase :pass)]
+                                                        "failed-run-id" [(the-testcase :pass)]}))))
     (is (= [{:testsuite ["some suite"]
              :classname "some class"
              :name "another testcase"

                                     "failed-run-id" another-build-input-1
                                     "another-passed-run-id" build-input-2
                                     "another-failed-run-id" build-input-2}
                                    (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))]
                                                        "another-passed-run-id" [(a-testsuite "a suite"
                                                                                              (a-testcase "a class" "the testcase" :pass))]
                                                        "another-failed-run-id" [(a-testsuite "a suite"
                                                                                              (a-testcase "a class" "the testcase" :fail))]}))))
    (is (= []
           (flaky-testcases-as-list {"passed-run-id" {}
                                     "failed-run-id" {}}
                                    (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))]})))))
  (testing "should not find flaky tests in two failing builds where tests fails consistently"
    (is (= []
           (flaky-testcases-as-list {"first-failed-run-id" build-input-1
                                     "second-failed-run-id" another-build-input-1}
                                    (dummy-test-lookup {"first-failed-run-id" [(a-testsuite "a suite"
                                                                                            (a-testcase "a class" "const failing testcase" :fail))]
                                                        "second-failed-run-id" [(a-testsuite "a suite"
                                                                                             (a-testcase "a class" "const failing testcase" :fail))]})))))

  (testing "should find flaky test in two failing builds"
    (is (= [{:testsuite ["a suite"]

           (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" [(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"
