Testing Angular2 component @Input and @Output
<p>How can I structure tests for Angular2 simple form component:</p>

<pre><code>import { Component, EventEmitter, Input, Output } from '@angular/core';

@Component({
  selector: 'user-form',
  template: `
    &lt;input [(ngModel)]="user.name"&gt;
    &lt;button (click)="remove.emit(user)"&gt;Remove&lt;/button&gt;
  `
})
export class UserFormComponent {
  @Input() user: any;
  @Output() remove: EventEmitter&lt;any&gt; = new EventEmitter();
}
</code></pre>