title: Angular2 unit test with @Input()
body: <p>I've got a component that uses the <code>@Input()</code> annotation on an instance variable and I'm trying to write my unit test for the <code>openProductPage()</code> method, but I'm a little lost at how I setup my unit test.  I <strong>could</strong> make that instance variable public, but I don't think I should have to resort to that.</p>
  
  <p>How do I setup my Jasmine test so that a mocked product is injected (provided?) and I can test the <code>openProductPage()</code> method?</p>
  
  <p>My component:</p>
  
  <pre><code>import {Component, Input} from "angular2/core";
  import {Router} from "angular2/router";
  
  import {Product} from "../models/Product";
  
  @Component({
      selector: "product-thumbnail",
      templateUrl: "app/components/product-thumbnail/product-thumbnail.html"
  })
  
  export class ProductThumbnail {
      @Input() private product: Product;
  
  
      constructor(private router: Router) {
      }
  
      public openProductPage() {
          let id: string = this.product.id;
          this.router.navigate([“ProductPage”, {id: id}]);
      }
  }
  </code></pre>