setting up unit test involving observer
<p>i'm having trouble figuring out how to approach writing a unit test for a few methods involving an observer.  I have an Iron-pages element that is set up like this</p>

<pre><code>&lt;iron-pages&gt;
    selected="[[page]]"
    attr-for-selected="name"
    fallback-selection="manhattan-transit-view404"
    role="main"&gt;
    &lt;manhattan-transit-home name="home"&gt;&lt;/manhattan-transit-home&gt;
    &lt;manhattan-transit-map name="map"&gt;&lt;/manhattan-transit-map&gt;
    &lt;manhattan-transit-route name="route"&gt;&lt;/manhattan-transit-route&gt;
    &lt;manhattan-transit-report name="report"&gt;&lt;/manhattan-transit-report&gt;
    &lt;manhattan-transit-view404 name="view404"&gt;&lt;/manhattan-transit-view404&gt;
&lt;/iron-pages&gt;
</code></pre>

<p>it contains the names of webpages reachable by clicking on their respected buttons to allow a user to change web pages.  There is an observer that is set up like this int the script node</p>

<pre><code>properties: {
    page: {
      type: String,
      reflectToAttribute: true,
      observer: '_pageChanged'
    }
  },

  observers: [
    '_routePageChanged(routeData.page)'
  ],

  _routePageChanged: function(page) {
    this.page = page || 'home';
  },

  _pageChanged: function(page) {
    // Load page import on demand. Show 404 page if fails
    var resolvedPageUrl = this.resolveUrl('manhattan-transit-' + page + '.html');
    this.importHref(resolvedPageUrl, null, this._showPage404, true);
  },

  _showPage404: function() {
    this.page = 'view404';
  }
</code></pre>

<p>I am new to testing and I think I need a test for the _routePageChanged, the _pageChanged, and the _show404 functions, and have no idea how to approach testing those.  I know i need to make sure the page switches correctly based on the clicked info, and I am probably going to want to simulate the various clicks but for the test, but don't know how to go about doing that.</p>