           it("is updated correctly") { () -> Promise<Void> in
             windowElement.attrs[.Minimized] = false
 
-            AdversaryWindowElement.onReadAttribute(.Minimized) { _ in
-              // After the first read, .Minimized will be true.
+            var observer: AdversaryObserver?
+            AdversaryObserver.onAddNotification(.WindowMiniaturized) { obs in
+              observer = obs
+            }
+            windowElement.onAttributeFirstRead(.Minimized) {
               windowElement.attrs[.Minimized] = true
-            }
-            AdversaryObserver.onAddNotification(.WindowMiniaturized) { observer in
-              observer.emit(.WindowMiniaturized, forElement: windowElement)
+              observer?.emit(.WindowMiniaturized, forElement: windowElement)
             }
 
             return initialize().then { winDelegate -> () in

              windowElement.attrs[.Main]    = true
              appElement.attrs[.MainWindow] = windowElement
              observer.emit(.MainWindowChanged, forElement: windowElement)
            }

            return initializeApp().then { appDelegate -> () in


      describe("AXUIElement notifications") {
        beforeEach { AdversaryObserver.reset() }

        // Because observers only have one callback per application, they are owned by the
        // application delegate and window notifications are forwarded on, so to fully test this we
