public static Map<String, VersionRange> defaultFeatureMap(boolean enableUnstable) {
        Map<String, VersionRange> features = new HashMap<>(1);
        features.put(MetadataVersion.FEATURE_NAME, VersionRange.of(
                MetadataVersion.MINIMUM_KRAFT_VERSION.featureLevel(),
                enableUnstable ?
                    MetadataVersion.latestTesting().featureLevel() :
                    MetadataVersion.latestProduction().featureLevel()));
        for (Features feature : Features.PRODUCTION_FEATURES) {
            short maxVersion = enableUnstable ? feature.latestTesting() : feature.latestProduction();
            if (maxVersion > 0) {
                features.put(feature.featureName(), VersionRange.of(feature.minimumProduction(), maxVersion));
            }
        }
        return features;
    }
@Test
    public void testDefaultFeatureMap() {
        Map<String, VersionRange> expectedFeatures = new HashMap<>(1);
        expectedFeatures.put(MetadataVersion.FEATURE_NAME, VersionRange.of(
            MetadataVersion.MINIMUM_KRAFT_VERSION.featureLevel(),
            MetadataVersion.LATEST_PRODUCTION.featureLevel()));
        for (Features feature : Features.PRODUCTION_FEATURES) {
            short maxVersion = feature.defaultValue(MetadataVersion.LATEST_PRODUCTION);
            if (maxVersion > 0) {
                expectedFeatures.put(feature.featureName(), VersionRange.of(
                    feature.minimumProduction(),
                    maxVersion
                ));
            }
        }
        assertEquals(expectedFeatures, QuorumFeatures.defaultFeatureMap(false));
    }