title: Rhino Mock Expect
body: <p>Why is the response below always null in my test?</p>
  
  <p>SSO.cs</p>
  
  <pre><code> public class SSO : ISSO
      {
          const string SSO_URL = "http://localhost";
          const string SSO_PROFILE_URL = "http://localhost";
  
          public AuthenticateResponse Authenticate(string userName, string password)
          {
              return GetResponse(SSO_URL);
          }
  
          public void GetProfile(string key)
          {
              throw new NotImplementedException();
          }
  
          public virtual AuthenticateResponse GetResponse(string url)
          {
              return new AuthenticateResponse();
          }
      }
  
      public class AuthenticateResponse
      {
          public bool Expired { get; set; }
      }
  </code></pre>
  
  <p>SSOTest.cs</p>
  
  <pre><code> [TestMethod()]
  public void Authenticate_Expired_ReturnTrue()
  {
      var target = MockRepository.GenerateStub&lt;SSO&gt;();
      AuthenticateResponse authResponse = new AuthenticateResponse() { Expired = true };
  
      target.Expect(t =&gt; t.GetResponse("")).Return(authResponse);
      target.Replay();
  
      var response = target.Authenticate("mflynn", "password");
  
  
      Assert.IsTrue(response.Expired);
  }
  </code></pre>