Setting up an entire actor system in the tests causes this test to take a long time (~4 seconds) and also brings a lot of other code into scope during the tests. What about instead creating local actor refs for testing? Akka actually has good support for this. You can look at an example I added here:

https://github.com/apache/spark/blob/master/core/src/test/scala/org/apache/spark/deploy/worker/WorkerWatcherSuite.scala#L42

Would that be sufficient to test this case?