@Override
  public List<String> assignSegment(String segmentName, Map<String, Map<String, String>> currentAssignment,
      InstancePartitions instancePartitions, InstancePartitionsType instancePartitionsType) {
    validateSegmentAssignmentStrategy(instancePartitions);
    return SegmentAssignmentUtils.assignSegmentWithoutReplicaGroup(currentAssignment, instancePartitions, _replication);
  }
@Test
  public void testAssignSegment() {
    Map<String, Map<String, String>> currentAssignment = new TreeMap<>();

    // Segment 0 should be assigned to instance 0, 1, 2
    // Segment 1 should be assigned to instance 3, 4, 5
    // Segment 2 should be assigned to instance 6, 7, 8
    // Segment 3 should be assigned to instance 9, 0, 1
    // Segment 4 should be assigned to instance 2, 3, 4
    // ...
    int expectedAssignedInstanceId = 0;
    for (String segmentName : SEGMENTS) {
      List<String> instancesAssigned =
          _segmentAssignment.assignSegment(segmentName, currentAssignment, _instancePartitionsMap);
      assertEquals(instancesAssigned.size(), NUM_REPLICAS);
      for (int replicaId = 0; replicaId < NUM_REPLICAS; replicaId++) {
        assertEquals(instancesAssigned.get(replicaId), INSTANCES.get(expectedAssignedInstanceId));
        expectedAssignedInstanceId = (expectedAssignedInstanceId + 1) % NUM_INSTANCES;
      }
      currentAssignment
          .put(segmentName, SegmentAssignmentUtils.getInstanceStateMap(instancesAssigned, SegmentStateModel.ONLINE));
    }
  }