> so this is a trick to create an EmptyLocalActorRef to be able to test invalid refs?

yes

> what defines an invalid ref? 

an actor ref that doesn't point to an existing actor instance. For the test it's only important that the empty ref's path is the same as that of an actor created immediately afterwards, so that it can be resolved by a channel.

> can that be created in some other way?

before, I created it with `actorOf` but the problem here is that I cannot stop that actor and wait for its termination as it will not let me reliably create an actor with the same name. I could run all these tests inside a special purpose actor but think that it complicates the test much more than needed. Can you image another way of creating an invalid actor ref?

> I don't like that we use internal api, if not needed.

agree, but I felt it was the best compromise in this case.