How to test that Akka actor was created in Scala
问题 I'm trying to write a test that will verify that my actor below is creating a heartBeatExpireWorker and a heartBeatAccepter, but I have no idea how to do it. First I was thinking I could use Mockhito mock or a spy in place of context and then verify that I called actorOf, but I can't figure out a way to inject the context without breaking the Akka testing framework. Then, I was thinking that I could send an Identify message to the workers to verify that they exist. But it occurred to me that