code: private synchronized int getEndingMessageId(final Follower follower) {
          if (this.isFollowerActive(follower)) {
              return this.messages.getLatestPosition();
          } else if (this.isFollowerTerminated(follower)) {
              return this.terminatedFollowerRanges.get(follower)[1];
          } else {
              throw new IllegalStateException("Follower never before seen.");
          }
      }
docs: Get index of the last plus one message that the follower has access to.
  
  @param follower
  Follower in question.
  @return Ending message ID after {@link #followerTerminated(Follower)}.
  {@link MessageStore#getLatestPosition()} between
  {@link #followerStarted(Follower)} and
  {@link #followerTerminated(Follower)}. Will throw an exception
  otherwise.