@Test
public void testFollowerSchedulesElectionIfAutomaticElectionsAreDisabled() {

    MockRaftActorContext context = createActorContext();
    context.setConfigParams(new DefaultConfigParamsImpl() {
        @Override
        public FiniteDuration getElectionTimeOutInterval() {
            return FiniteDuration.apply(100, TimeUnit.MILLISECONDS);
        }
    });
    context.setRaftPolicy(createRaftPolicy(false, false));
    follower = createBehavior(context);
    TimeoutNow timeoutNow = MessageCollectorActor.expectFirstMatching(followerActor, TimeoutNow.class);
    RaftActorBehavior newBehavior = follower.handleMessage(ActorRef.noSender(), timeoutNow);
    assertSame("handleMessage result", follower, newBehavior);
}