### Question:
RecoveryActor extends AbstractActor { public static Props props() { return Props.create(RecoveryActor.class); }  static Props props(); @Override Receive createReceive();  }### Answer:
@Test void recoverActorNotEquals() { final var testMsg = "test"; final var testProbe = new TestKit(system); final var repositoryActor = new TestKit(system); var repoActorPath = ActorPath.fromString("akka: var repoActorNew = new TestKit(system); final var recoveryActor = system.actorOf(RecoveryActor.props()); recoveryActor.tell(new RecoveryActor.RecoverActor(repoActorPath, () -> repoActorNew.getRef()), testProbe.getRef()); ActorRef result = testProbe.expectMsgClass(ActorRef.class); result.tell(testMsg, testProbe.getRef()); repoActorNew.expectMsg(testMsg); }
@Test void recoverActorEquals() { final var testProbe = new TestKit(system); final var repositoryActor = system.actorOf(RepositoryActor.props()); var repoActorPath = ActorPath.fromString("akka: final var recoveryActor = system.actorOf(RecoveryActor.props()); recoveryActor.tell(new RecoveryActor.RecoverActor(repoActorPath, () -> repositoryActor), testProbe.getRef()); var repoActorNew = testProbe.expectMsgClass(ActorRef.class); assertEquals(repoActorNew, repositoryActor); }