private void initializePartition(Set<TrackerClient> trackerClients, int partitionId, long clusterGenerationId)
  {
    if (!_partitionLoadBalancerStateMap.containsKey(partitionId))
    {
      PartitionState partitionState = new PartitionState(partitionId,
          new DelegatingRingFactory<>(_relativeStrategyProperties.getRingProperties()),
          _relativeStrategyProperties.getRingProperties().getPointsPerWeight(),
          _listenerFactories.stream().map(factory -> factory.create(partitionId)).collect(Collectors.toList()));

      updateStateForPartition(trackerClients, partitionId, partitionState, clusterGenerationId, false);

      if (_firstPartitionId < 0)
      {
        _firstPartitionId = partitionId;
      }
    }
  }
@Test(dataProvider = "partitionId")
  public void testInitializePartition(int partitionId)
  {
    setup(new D2RelativeStrategyProperties(), new ConcurrentHashMap<>());

    List<TrackerClient> trackerClients = TrackerClientMockHelper.mockTrackerClients(2,
        Arrays.asList(20, 20), Arrays.asList(10, 10), Arrays.asList(200L, 500L), Arrays.asList(100L, 200L), Arrays.asList(0, 0));

    assertTrue(_stateUpdater.getPointsMap(partitionId).isEmpty(), "There should be no state before initialization");

    _stateUpdater.updateState(new HashSet<>(trackerClients), partitionId, DEFAULT_CLUSTER_GENERATION_ID, false);

    assertEquals(_stateUpdater.getPointsMap(partitionId).get(trackerClients.get(0).getUri()).intValue(), HEALTHY_POINTS);
    assertEquals(_stateUpdater.getPointsMap(partitionId).get(trackerClients.get(1).getUri()).intValue(), HEALTHY_POINTS);
    assertEquals(_stateUpdater.getFirstValidPartitionId(), partitionId);
  }