private void validateThatRedundancyPerGroupIsEqual() {
        int redundancyPerGroup = redundancy.effectiveFinalRedundancy() / rootGroup.getSubgroups().size();
        String expPartitions = createDistributionPartitions(redundancyPerGroup, rootGroup.getSubgroups().size());
        if (!rootGroup.getPartitions().get().equals(expPartitions)) {
            throw new IllegalArgumentException("Expected redundancy per leaf group to be " +
                                               redundancyPerGroup + ", but it is not according to distribution partitions '" +
                                               rootGroup.getPartitions().get() +
                                               "'. Expected distribution partitions should be '" + expPartitions + "'");
        }
    }
Class used to validate that hierarchic distribution is correctly setup when having an indexed content cluster.

Note that this class does not implement the com.yahoo.vespa.model.application.validation.Validator interface,
but is instead used in the context of com.yahoo.vespa.model.ConfigProducer.validate() such that it can be unit tested
without having to build the complete vespa model.

@author geirst
config-model/src/main/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionValidator.java