@Test
public void testNonVotingOnRecovery() {

    TEST_LOG.info("testNonVotingOnRecovery starting");
    DefaultConfigParamsImpl config = new DefaultConfigParamsImpl();
    config.setElectionTimeoutFactor(1);
    config.setHeartBeatInterval(FiniteDuration.create(1, TimeUnit.MILLISECONDS));
    String persistenceId = factory.generateActorId("test-actor-");
    InMemoryJournal.addEntry(persistenceId, 1,  new SimpleReplicatedLogEntry(0, 1,
            new ServerConfigurationPayload(Arrays.asList(new ServerInfo(persistenceId, false)))));
    TestActorRef<MockRaftActor> raftActorRef = factory.createTestActor(MockRaftActor.builder().id(persistenceId)
            .config(config).props().withDispatcher(Dispatchers.DefaultDispatcherId()), persistenceId);
    MockRaftActor mockRaftActor = raftActorRef.underlyingActor();
    mockRaftActor.waitForInitializeBehaviorComplete();
    // Sleep a bit and verify it didn't get an election timeout and schedule an election.
    Uninterruptibles.sleepUninterruptibly(400, TimeUnit.MILLISECONDS);
    assertEquals("getRaftState", RaftState.Follower, mockRaftActor.getRaftState());
    TEST_LOG.info("testNonVotingOnRecovery ending");
}