       (testing "GET /ctia/:observable_type/:observable_value/verdict"
         (let [{status :status
                verdict :parsed-body}
-              (get "ctia/ip/10.0.01/verdict"
-                   :headers {"api_key" "45c1f5e3f05d0"})]
-          (is (= 404 status)))))))
+              (get "ctia/ip/10.0.0.1/verdict"
+                   :headers {"api_key" "45c1f5e3f05d0"})]
+          (is (= 404 status))))))
+
+  (testing ":end_time is today, but in the future"
+    (let [format (partial format/unparse (format/formatters :date-time))
+
+          {status :status
+           judgement :parsed-body}
+          (post "ctia/judgement"
+                :body {:valid_time {:start_time (-> (clj-time/now)
+                                                    (clj-time/minus
+                                                     (clj-time/minutes 10))
+                                                    format)
+                                    :end_time (-> (clj-time/now)
+                                                  (clj-time/plus
+                                                   (clj-time/seconds 10))
+                                                  format)}
+                       :observable {:value "10.0.0.2"
+                                    :type "ip"}
+                       :reason_uri "https://example.com/",
+                       :source "Example",
+                       :external_ids ["judgement-3"],
+                       :disposition 2,
+                       :disposition_name "Malicious"
+                       :reason "Example judgement",
+                       :source_uri "https://example.com/",
+                       :priority 0,
+                       :severity "None",
+                       :tlp "green",
+                       :confidence "None"}
+                :headers {"api_key" "45c1f5e3f05d0"})]
+      (is (= 201 status))
+
+      (testing "GET /ctia/:observable_type/:observable_value/verdict"
+        (let [{status :status
+               verdict :parsed-body}
+              (get "ctia/ip/10.0.0.2/verdict"
+                   :headers {"api_key" "45c1f5e3f05d0"})]
+          (is (= 200 status))
+          (is (= (:id judgement)
+                 (:judgement_id verdict))))))))

(ns ctia.http.routes.observable.verdict-test
  (:refer-clojure :exclude [get])
  (:require [clj-time.core :as clj-time]
            [clj-momo.lib.time :as time]
            [clj-momo.test-helpers.core :as mht]
            [clojure.test :refer [is join-fixtures testing use-fixtures]]

                               :end_time #inst "2525-01-01T00:00:00.000-00:00"}}
                 verdict)))))))

(deftest-for-each-store test-observable-verdict-with-different-valid-times
  (helpers/set-capabilities! "foouser" "user" all-capabilities)
  (whoami-helpers/set-whoami-response "45c1f5e3f05d0" "foouser" "user")

  (testing ":start_time is now and :end_date is in 2 weeks"

    (let [sha (str "39091a6e0d00472273c3d644a47611b"
                   "ac95554d8d48899ec74d1b3127542f89b")
