 (def cong-id (UUID. 0 1))
 (def user-id (UUID. 0 2))
 (def test-time (Instant/ofEpochSecond 42))
-(def cong-created-event {:event/type :congregation.event/congregation-created
-                         :event/version 1
-                         :congregation/id cong-id
-                         :congregation/name "Cong1 Name"
-                         :congregation/schema-name "cong1_schema"})
-(def user-created-event {:event/type :congregation.event/gis-user-created
-                         :event/version 1
-                         :congregation/id cong-id
-                         :user/id user-id
-                         :gis-user/username "username123"
-                         :gis-user/password "password123"})
-(def user-deleted-event {:event/type :congregation.event/gis-user-deleted
-                         :event/version 1
-                         :congregation/id cong-id
-                         :user/id user-id
-                         :gis-user/username "username123"})
-(def schema-is-present-event {:event/type :db-admin.event/gis-schema-is-present
-                              :event/version 1
-                              :event/transient? true
-                              :event/system "test"
-                              :event/time test-time
-                              :congregation/id cong-id
-                              :congregation/schema-name "cong1_schema"})
-(def user-is-present-event {:event/type :db-admin.event/gis-user-is-present
+(def congregation-created {:event/type :congregation.event/congregation-created
+                           :event/version 1
+                           :congregation/id cong-id
+                           :congregation/name "Cong1 Name"
+                           :congregation/schema-name "cong1_schema"})
+(def gis-user-created {:event/type :congregation.event/gis-user-created
+                       :event/version 1
+                       :congregation/id cong-id
+                       :user/id user-id
+                       :gis-user/username "username123"
+                       :gis-user/password "password123"})
+(def gis-user-deleted {:event/type :congregation.event/gis-user-deleted
+                       :event/version 1
+                       :congregation/id cong-id
+                       :user/id user-id
+                       :gis-user/username "username123"})
+(def gis-schema-is-present {:event/type :db-admin.event/gis-schema-is-present
                             :event/version 1
                             :event/transient? true
                             :event/system "test"
                             :event/time test-time
                             :congregation/id cong-id
-                            :user/id user-id
-                            :gis-user/username "username123"})
-(def user-is-absent-event {:event/type :db-admin.event/gis-user-is-absent
-                           :event/version 1
-                           :event/transient? true
-                           :event/system "test"
-                           :event/time test-time
-                           :congregation/id cong-id
-                           :user/id user-id
-                           :gis-user/username "username123"})
+                            :congregation/schema-name "cong1_schema"})
+(def gis-user-is-present {:event/type :db-admin.event/gis-user-is-present
+                          :event/version 1
+                          :event/transient? true
+                          :event/system "test"
+                          :event/time test-time
+                          :congregation/id cong-id
+                          :user/id user-id
+                          :gis-user/username "username123"})
+(def gis-user-is-absent {:event/type :db-admin.event/gis-user-is-absent
+                         :event/version 1
+                         :event/transient? true
+                         :event/system "test"
+                         :event/time test-time
+                         :congregation/id cong-id
+                         :user/id user-id
+                         :gis-user/username "username123"})
 
 (defn- apply-events [events]
   (testutil/apply-events db-admin/projection events))

                     (generate-commands events)))

              (testing "> GIS user is present"
                (let [events (conj events user-is-present-event)]
                  (is (empty? (generate-commands events)))

                  (testing "> GIS user password changed"
                    (let [events (conj events (assoc user-created-event :gis-user/password "new password"))]
                      (is (= [{:command/type :db-admin.command/ensure-gis-user-present
                               :command/time test-time
                               :command/system "territory-bro.db-admin"

                             (generate-commands events)))))

                  (testing "> GIS user deleted"
                    (let [events (conj events gis-user-deleted)]
                      (is (= [{:command/type :db-admin.command/ensure-gis-user-absent
                               :command/time test-time
                               :command/system "territory-bro.db-admin"
