I have a an actor defined as so:
class nodeActor(ID: String) extends Actor
which contains a method, which is used to set up the actor before it
If you want to do this for testing then when creating actor you can just do this:
import akka.testkit.TestActorRef val actorRef = TestActorRef[MyActor] val actor = actorRef.underlyingActor
Then you can run methods on actor