public void A_Flow_with_Sink_LastOption_must_yield_the_first_error()
{
this.AssertAllStagesStopped(() =>
{
Source.Failed<int>(new SystemException("ex"))
.Invoking(s => s.RunWith(Sink.LastOrDefault<int>(), Materializer).Wait(TimeSpan.FromSeconds(1)))
.ShouldThrow<AggregateException>()
.WithInnerException<SystemException>()
.WithInnerMessage("ex");
}, Materializer);
}