title: About use Stubs - Java
body: <p>I'm readin <a href="http://xunitpatterns.com/Test%20Stub.html" rel="nofollow">http://xunitpatterns.com/Test%20Stub.html</a> and have some questions about the use of stubs, for example, in the code shown on the page the author creates a class called <code>TimeProviderTestStub.java</code> for use in test code.  I have some doubts about this line in the test code:</p>
  
  <pre><code>TimeDisplay sut = new TimeDisplay();
    //      Test Double installation
    sut.setTimeProvider(tpStub);
  </code></pre>
  
  <p>Do I need modify my class(SUT) to recieve one object TimeProviderTestSub? </p>