public void QueueSource_should_finish_offer_and_complete_futures_when_stream_completed()
{
this.AssertAllStagesStopped(() =>
{
var s = this.CreateManualProbe<int>();
var queue =
Source.Queue<int>(0, OverflowStrategy.DropHead)
.To(Sink.FromSubscriber(s))
.Run(_materializer);
var sub = s.ExpectSubscription();
queue.WatchCompletionAsync()
.ContinueWith(t => "done", TaskContinuationOptions.OnlyOnRanToCompletion)
.PipeTo(TestActor);
queue.OfferAsync(1).PipeTo(TestActor);
ExpectNoMsg(_pause);
sub.Cancel();
ExpectMsgAllOf<object>(QueueClosed.Instance, "done");
}, _materializer);
}