class RaftActorLeadershipTransferCohort {

    @VisibleForTesting
    void doTransfer() {
        RaftActorBehavior behavior = raftActor.getCurrentBehavior();
        // Sanity check...
        if (behavior instanceof Leader) {
            isTransferring = true;
            ((Leader)behavior).transferLeadership(this);
        } else {
            LOG.debug("{}: No longer the leader - skipping transfer", raftActor.persistenceId());
            finish(true);
        }
    }

      RaftActorLeadershipTransferCohort(final RaftActor raftActor);
      RaftActorLeadershipTransferCohort(final RaftActor raftActor, final @Nullable String requestedFollowerId);

}