title: why does angular 2 provider {useValue: ...} clone objects?
body: <p>Angular 2 advanced testing doc:</p>
  
  <pre><code>userServiceStub = {
    isLoggedIn: true,
    user: { name: 'Test User'}
  };
  
  TestBed.configureTestingModule({
     declarations: [ WelcomeComponent ],
  // providers:    [ UserService ]  // NO! Don't provide the real service!
                                    // Provide a test-double instead
     providers:    [ {provide: UserService, useValue: userServiceStub } ]
  });
  
  fixture = TestBed.createComponent(WelcomeComponent);
  comp    = fixture.componentInstance;
  
  // UserService actually injected into the component
  userService = fixture.debugElement.injector.get(UserService);
  componentUserService = userService;
  // UserService from the root injector
  userService = TestBed.get(UserService);
  </code></pre>
  
  <p>It seems that the service, userService form injector.get() and userServiceStub from we explicitly created are different Object.</p>
  
  <pre><code>it('stub object and injected UserService should not be the same', () =&gt; {
    expect(userServiceStub === userService).toBe(false);
  
    // Changing the stub object has no effect on the injected service
    userServiceStub.isLoggedIn = false;
    expect(userService.isLoggedIn).toBe(true);
  });
  </code></pre>
  
  <p>The doc say that the <code>userService</code> here is a copy of <code>userServiceStub</code>. Is that means that Angular 2 DI treat all <code>{provide: someting, useValue: someValue}</code> as clone a new Object frome <code>someValue</code>? Why DI system not use <code>someValue</code> directly?</p>
  
  <p>Related github <a href="http://github.com/angular/angular.io/issues/2910" rel="noreferrer">issue</a> of Angular.io.</p>