code: private AbstractState createState(CopycatServer.State state) {
      switch (state) {
        case INACTIVE:
          return new InactiveState(this);
        case RESERVE:
          return new ReserveState(this);
        case PASSIVE:
          return new PassiveState(this);
        case FOLLOWER:
          return new FollowerState(this);
        case CANDIDATE:
          return new CandidateState(this);
        case LEADER:
          return new LeaderState(this);
        default:
          throw new AssertionError();
      }
    }
docs: Creates an internal state for the given state type.