@Override
    public Duration convert(String source) {
        return isNotEmpty(source) ? DurationStyle.detectAndParse(source) : null;
    }
@Test
    void testConvert() {
        assertEquals(Duration.ofMillis(1000), converter.convert("1000ms"));
        assertEquals(Duration.ofSeconds(1), converter.convert("1s"));
        assertEquals(Duration.ofMinutes(1), converter.convert("1m"));
        assertEquals(Duration.ofHours(1), converter.convert("1h"));
        assertEquals(Duration.ofDays(1), converter.convert("1d"));

        assertNull(converter.convert(null));
        assertThrows(IllegalArgumentException.class, () -> {
            converter.convert("ttt");
        });
    }