title: How do you unit test classes that use timers internally?
body: <p>Like it or not, occasionally you have have to write tests for classes that make internal use of timers.</p>
  
  <p>Say for example a class that takes reports of system availability and raises an event if the system has been down for too long</p>
  
  <pre><code>public class SystemAvailabilityMonitor {
      public event Action SystemBecameUnavailable = delegate { };
      public event Action SystemBecameAvailable = delegate { };
      public void SystemUnavailable() {
          //..
      }
      public void SystemAvailable() {
          //..
      }
      public SystemAvailabilityMonitor(TimeSpan bufferBeforeRaisingEvent) {
          //..
      }
  }
  </code></pre>
  
  <p>I have a couple tricks which I use (will post these as an answer) but I wonder what other people do since I'm not fully satisfied with either of my approaches.</p>