public static TimedCacheReloadTrigger fromConfig(ReadableConfig config) {
        checkArgument(
                config.get(CACHE_TYPE) == FULL,
                "'%s' should be '%s' in order to build a Timed cache reload trigger.",
                CACHE_TYPE.key(),
                FULL);
        checkArgument(
                config.get(FULL_CACHE_RELOAD_STRATEGY) == TIMED,
                "'%s' should be '%s' in order to build a Timed cache reload trigger.",
                FULL_CACHE_RELOAD_STRATEGY.key(),
                TIMED);
        checkArgument(
                config.getOptional(FULL_CACHE_TIMED_RELOAD_ISO_TIME).isPresent(),
                "Missing '%s' in the configuration. This option is required to build a Timed cache reload trigger.",
                FULL_CACHE_TIMED_RELOAD_ISO_TIME.key());
        Temporal reloadTime =
                (Temporal)
                        DateTimeFormatter.ISO_TIME.parseBest(
                                config.get(FULL_CACHE_TIMED_RELOAD_ISO_TIME),
                                OffsetTime::from,
                                LocalTime::from);
        int reloadIntervalInDays = config.get(FULL_CACHE_TIMED_RELOAD_INTERVAL_IN_DAYS);
        return new TimedCacheReloadTrigger(reloadTime, reloadIntervalInDays);
    }
@Test
    void testCreateFromConfig() {
        assertThat(TimedCacheReloadTrigger.fromConfig(createValidConf())).isNotNull();
        Configuration conf1 = createValidConf().set(CACHE_TYPE, PARTIAL);
        assertThatThrownBy(() -> TimedCacheReloadTrigger.fromConfig(conf1))
                .isInstanceOf(IllegalArgumentException.class)
                .hasMessageContaining("should be 'FULL'");
        Configuration conf2 = createValidConf().set(FULL_CACHE_RELOAD_STRATEGY, PERIODIC);
        assertThatThrownBy(() -> TimedCacheReloadTrigger.fromConfig(conf2))
                .isInstanceOf(IllegalArgumentException.class)
                .hasMessageContaining("should be 'TIMED'");
        Configuration conf3 = createValidConf();
        conf3.removeConfig(FULL_CACHE_TIMED_RELOAD_ISO_TIME);
        assertThatThrownBy(() -> TimedCacheReloadTrigger.fromConfig(conf3))
                .isInstanceOf(IllegalArgumentException.class)
                .hasMessageContaining("Missing '" + FULL_CACHE_TIMED_RELOAD_ISO_TIME.key() + "'");
        Configuration conf4 = createValidConf().set(FULL_CACHE_TIMED_RELOAD_ISO_TIME, "10");
        assertThatThrownBy(() -> TimedCacheReloadTrigger.fromConfig(conf4))
                .isInstanceOf(DateTimeParseException.class)
                .hasMessageContaining("could not be parsed");
    }