@Test
public void testFollowerSchedulesElectionTimeoutImmediatelyWhenItHasNoPeers() {

    MockRaftActorContext context = createActorContext();
    Stopwatch stopwatch = Stopwatch.createStarted();
    follower = createBehavior(context);
    TimeoutNow timeoutNow = MessageCollectorActor.expectFirstMatching(followerActor, TimeoutNow.class);
    long elapsed = stopwatch.elapsed(TimeUnit.MILLISECONDS);
    assertTrue(elapsed < context.getConfigParams().getElectionTimeOutInterval().toMillis());
    RaftActorBehavior newBehavior = follower.handleMessage(ActorRef.noSender(), timeoutNow);
    assertTrue("Expected Candidate", newBehavior instanceof Candidate);
}