 
   (is (= #{} (db/find-usernames-by-email "unknown@xxx.com")))
   (is (= #{} (db/find-usernames-by-email "jack@sixsq.com"))))
+
 
 (deftest test-users-by-email
   (th/add-user-for-test! {:username     "jack"

                                  :lastname       "last"
                                  :organization   "myorg"})))

    (let [user-names (db/existing-user-names)
          user (db/get-user (first user-names))]
      (is (= 2 (count user-names)))
      (is (= "alpha-role, beta-role" (:roles user)))
      (is (= false (:deleted user)))
      (is (= "st@s.com" (:emailAddress user)))
      (is (= false (:isSuperUser user)))
      (is (= "st" (:username user)))
      (is (= "ACTIVE" (:state user)))
      (is (= "first" (:firstName user)))
      (is (= "last" (:lastName user)))
      (is (:password user))
      (is (:created user))
      (is (= "USER ANON" (db/find-roles-for-username "st"))))))

(deftest test-user-creation-avoids-user-same-name
  (th/add-user-for-test! {:username     "stef"

                          :githublogin  "joe"})
  (is (thrown-with-msg? Exception #"one result for joe"
                        (db/find-username-by-authn :githublogin "joe"))))


(deftest check-user-exists?
  (let [test-username "some-long-random-user-name-that-does-not-exist"
