The Akka Testing docs give the following way to create a TestActorRef:
import akka.testkit.TestActorRef val actorRef = TestActorRef[MyActor]
How do I extend this for testing an existing actor that takes constructor arguments? When I try running this as is, substituting in my actor class, I get the following error:
"error while creating actor
akka.actor.ActorInitializationException:Could not instantiate Actor
Make sure Actor is NOT defined inside a class/trait,
if so put it outside the class/trait, f.e. in a companion object,
OR try to change: 'actorOf(Props[MyActor]' to 'actorOf(Props(new MyActor)'."
The various ideas I could think up for adding the args after the class name inside the square brackets all crashed and burned, too.