Just writing a unit test to ensure an actor shuts down under certain conditions, so I have a test like:
val tddTestActor = TestActorRef[MyActor](Props(classOf[MyActor], "param1"))
tddTestActor ! someMessage
tddTestActor.isTerminated shouldBe true
I'm picking up a warning that isTerminated is deprecated. The hint recommends I use context.watch() however in a unit test I don't have a parent actor or any context to watch.
What would be the bext way to validate tddTestActor shuts down ?