title: Mock a "global" property in Kotlin
body: <p>Is there a way to change the return value of the property accessor called when running unit tests? Like mocking the result of the property <code>settingsState</code>?</p>
  <p>I am learning to create unit tests. What that class makes is to bring stored data into the program, this data is given in a visual form. In my test, I want to define what is going on there because the window won't open there.</p>
  <pre><code>// top-level declaration outside class
  val settingsState: ApplicationSettingsState
      get() = ServiceManager.getService(ApplicationSettingsState::class.java)
  </code></pre>