title: How to create meaningful unit tests for fakes
body: <p>I understand the basics on how to unit test, however I often struggle at finding what meaningful things to test. I believe I have to create a fake implementation and inject into the consumer. I have a service class responsible to subscribing to (using Exchange Web Services (EWS)) Exchange 2010 requesting updates on new mail. In order to decouple my subscribing implementation from the service itself I decided to inject the implementation in the service. Below is what I currently have. I've omitted code dealing specifically communicating with Exchange.</p>
  
  <pre><code>// Not a big fan of having two identical interfaces...
  public interface IStreamingNotificationService
  {
      void Subscribe();
  }
  
  public interface IExchangeService
  {
      void Subscribe();
  }
  
  public class StreamingNotificationService : IStreamingNotificationService
  {
      private readonly IExchangeService _exchangeService;
  
      public StreamingNotificationService(IExchangeService exchangeService)
      {
          if (exchangeService == null)
          {
              throw new ArgumentNullException("exchangeService");
          }
  
          _exchangeService = exchangeService;
      }
  
      public void Subscribe()
      {
          _exchangeService.Subscribe();
      }
  }
  
  public class ExchangeServiceImpl : IExchangeService
  {
      private readonly INetworkConfiguration _networkConfiguration;
      private ExchangeService ExchangeService { get; set; }
  
      public ExchangeServiceImpl(INetworkConfiguration networkConfiguration)
      {
          if (networkConfiguration == null)
          {
              throw new ArgumentNullException("networkConfiguration");
          }
  
          _networkConfiguration = networkConfiguration;
          // Set up EWS 
      }
  
      public void Subscribe()
      {
          // Subscribe for new mail notifications.
      }
  }
  </code></pre>
  
  <p>More specifically, how do I create a meaningful unit test to ensure subscribing works the way it should?</p>