   (is (= "foo@q***.dom"
          (email/obfuscate-addr "foo@bar.quux.dom"))))
 
+(defn find-content [body]
+  (:content (some #(and (map? %)
+                        (.contains (:type %) "text/html")
+                        %)
+                  body)))
+
 (deftest attached
   (testing "failures present"
     (let [email (atom [])]

                         "test/fail-gradle-no-task.bat"
                         "test/fail-gradle-no-task.bash"))))]
              (is (= 1 (-> build-doc :process :exit-code)))
              (is (.contains (-> @email :body first :content)
                             "Cannot expand ZIP")
                  (-> @email :body first :content))))
          (testing "with gradle task"
            (let [out (java.io.StringWriter.)
                  [opts res build-doc]

                         "test/fail-gradle-with-task.bat"
                         "test/fail-gradle-with-task.bash"))))]
              (is (= 1 (-> build-doc :process :exit-code)))
              (let [body (:body @email)
                    content (find-content body)]
                (when (is content body)
                  (is (.contains content ":core:integTest")))
                (is (= 4 (count body))
                    (pr-str @email))))))))))
