public static ClusterAllocationDiskSettings create(boolean enabled, String low, String high, String floodStage) {
        if (!enabled) {
            return ClusterAllocationDiskSettings.create(enabled, null);
        }
        return ClusterAllocationDiskSettings.create(enabled, createWatermarkSettings(low, high, floodStage));
    }
@Test
    public void createPercentageWatermarkSettings() throws Exception {
        ClusterAllocationDiskSettings settings = ClusterAllocationDiskSettingsFactory.create(true, "75%", "85%", "99%");

        assertThat(settings).isInstanceOf(ClusterAllocationDiskSettings.class);
        assertThat(settings.ThresholdEnabled()).isTrue();
        assertThat(settings.watermarkSettings()).isInstanceOf(PercentageWatermarkSettings.class);
        assertThat(settings.watermarkSettings().type()).isEqualTo(WatermarkSettings.SettingsType.PERCENTAGE);
        assertThat(settings.watermarkSettings().low()).isEqualTo(75D);
        assertThat(settings.watermarkSettings().high()).isEqualTo(85D);
        assertThat(settings.watermarkSettings().floodStage()).isEqualTo(99D);
    }