public void ActorRefSink_should_cancel_a_stream_when_actor_terminates()
{
var fw = Sys.ActorOf(Props.Create(() => new Fw(TestActor)).WithDispatcher("akka.test.stream-dispatcher"));
var publisher = this.SourceProbe<int>().To(Sink.ActorRef<int>(fw, onCompleteMessage: "done"))
.Run(materializer)
.SendNext(1)
.SendNext(2);
ExpectMsg(1);
ExpectMsg(2);
Sys.Stop(fw);
publisher.ExpectCancellation();
}
}