public void stopAndRestartTest() throws Exception {
TestActorRef<SupervisorActor> supervisor = TestActorRef.apply(
new Props(SupervisorActor.class), _system);
ActorRef workerActor = supervisor.underlyingActor().getWorker();
TestProbe probe = new TestProbe(_system);
probe.watch(workerActor);
supervisor.tell("10");
probe.expectMsgClass(Terminated.class);
Thread.sleep(2000);
// the actor should get restarted