public void interval_is_cancelled_on_completion()
{
var subject = new Subject<int>();
var stats = new StatsObserver<int>();
var scheduler = new ManualScheduler();
subject
.Sample(TimeSpan.FromSeconds(1), scheduler)
.Subscribe(stats);
subject.OnNext(0);
subject.OnCompleted();
scheduler.RunNext();
Assert.AreEqual(0, scheduler.QueueSize);
}