public static Sampler create(final String probability) {
        if (StringUtils.isBlank(probability)) {
            return ALWAYS_SAMPLE;
        }
        if ("0".equals(probability)) {
            return NEVER_SAMPLE;
        }
        if ("1".equals(probability) || "1.0".equals(probability) || "1.0.0".equals(probability)) {
            return ALWAYS_SAMPLE;
        }
        float parseProbability = NumberUtils.toFloat(probability, 1);
        if (parseProbability < 0.01f || parseProbability > 1) {
            throw new IllegalArgumentException(
                    "probability should be between 0.01 and 1: was " + probability);
        }
        return new CountSampler(parseProbability);
    }
@Test
    public void testCreate() {
        Assertions.assertEquals(CountSampler.create(""), Sampler.ALWAYS_SAMPLE);
        Assertions.assertEquals(CountSampler.create("0"), Sampler.NEVER_SAMPLE);
        Assertions.assertEquals(CountSampler.create("1"), Sampler.ALWAYS_SAMPLE);
        Assertions.assertEquals(CountSampler.create("0.5").getClass(), CountSampler.class);
    }