     func initializeApp() {
       waitUntil { done in
         OSXApplicationDelegate<TestUIElement, AdversaryApplicationElement, FakeObserver>.initialize(
-          axElement: appElement, notifier: notifier).then { applicationDelegate -> () in
-            appDelegate = applicationDelegate
-            observer = appDelegate.observer
-            app = Swindler.Application(delegate: appDelegate)
-            done()
+          axElement: appElement, notifier: notifier
+        ).then { applicationDelegate -> () in
+          appDelegate = applicationDelegate
+          observer = appDelegate.observer
+          app = Swindler.Application(delegate: appDelegate)
+          done()
         }
       }
     }

              observer?.emit(.MainWindowChanged, forElement: appElement)
            }

            var app: Swindler.Application!
            waitUntil { done in initializeApp().then { appDelegate -> () in
              app = Swindler.Application(delegate: appDelegate)
              done()
            } }
            expect(app.mainWindow.value).toEventuallyNot(beNil())
          }
        }

              appElement.attrs[.MainWindow] = windowElement
            }

            let app = Swindler.Application(delegate: initializeApp())
            expect(app.mainWindow.value).toEventuallyNot(beNil())
          }
        }
