@Test
public void testIsFollowerActive() {

    MockRaftActorContext context = new MockRaftActorContext();
    context.setCommitIndex(10);
    DefaultConfigParamsImpl configParams = new DefaultConfigParamsImpl();
    configParams.setHeartBeatInterval(new FiniteDuration(500, TimeUnit.MILLISECONDS));
    configParams.setElectionTimeoutFactor(1);
    context.setConfigParams(configParams);
    FollowerLogInformation followerLogInformation =
            new FollowerLogInformation(new PeerInfo("follower1", null, VotingState.VOTING), 9, context);
    assertFalse("Follower should be termed inactive before stopwatch starts",
            followerLogInformation.isFollowerActive());
    followerLogInformation.markFollowerActive();
    if (sleepWithElaspsedTimeReturned(200) > 200) {
        return;
    }
    assertTrue("Follower should be active", followerLogInformation.isFollowerActive());
    if (sleepWithElaspsedTimeReturned(400) > 400) {
        return;
    }
    assertFalse("Follower should be inactive after time lapsed",
            followerLogInformation.isFollowerActive());
    followerLogInformation.markFollowerActive();
    assertTrue("Follower should be active from inactive",
            followerLogInformation.isFollowerActive());
}