                     self.keyStore.testOptionalValue = DefaultsKey<Serializable?>("test")
 
                     var update: DefaultsObserver<Serializable?>.Update?
-                    let observer = defaults.observe(\.testOptionalValue) { receivedUpdate in
+                    observer = defaults.observe(\.testOptionalValue) { receivedUpdate in
                         update = receivedUpdate
                     }
 

                    let key = DefaultsKey<Serializable?>("test")

                    var update: DefaultsObserver<Serializable?>.Update?
                    let observer = defaults.observe(key) { receivedUpdate in
                        update = receivedUpdate
                    }
                    defaults[key: key] = self.defaultValue

                    defaults[\.testOptionalValue] = self.customValue

                    var update: DefaultsObserver<Serializable?>.Update?
                    observer = defaults.observe(\.testOptionalValue, options: [.initial, .old, .new]) { receivedUpdate in
                        update = receivedUpdate
                    }

