@Test void fromShouldThrowWhenPeriodHasIncorrectFormat() { PropertiesConfiguration configuration = new PropertiesConfiguration(); configuration.addProperty(HEALTH_CHECK_PERIOD, RANDOM_STRING); assertThatThrownBy(() -> PeriodicalHealthChecksConfiguration.from(configuration)) .isInstanceOf(NumberFormatException.class); }
public static PeriodicalHealthChecksConfiguration from(Configuration configuration) { return builder() .period(getDurationFromConfiguration(configuration)) .build(); }
PeriodicalHealthChecksConfiguration { public static PeriodicalHealthChecksConfiguration from(Configuration configuration) { return builder() .period(getDurationFromConfiguration(configuration)) .build(); } }
PeriodicalHealthChecksConfiguration { public static PeriodicalHealthChecksConfiguration from(Configuration configuration) { return builder() .period(getDurationFromConfiguration(configuration)) .build(); } @VisibleForTesting  PeriodicalHealthChecksConfiguration(Duration period); }
PeriodicalHealthChecksConfiguration { public static PeriodicalHealthChecksConfiguration from(Configuration configuration) { return builder() .period(getDurationFromConfiguration(configuration)) .build(); } @VisibleForTesting  PeriodicalHealthChecksConfiguration(Duration period); static Builder.RequiredPeriod builder(); static PeriodicalHealthChecksConfiguration from(Configuration configuration); Duration getPeriod(); @Override final boolean equals(Object o); @Override final int hashCode(); }
PeriodicalHealthChecksConfiguration { public static PeriodicalHealthChecksConfiguration from(Configuration configuration) { return builder() .period(getDurationFromConfiguration(configuration)) .build(); } @VisibleForTesting  PeriodicalHealthChecksConfiguration(Duration period); static Builder.RequiredPeriod builder(); static PeriodicalHealthChecksConfiguration from(Configuration configuration); Duration getPeriod(); @Override final boolean equals(Object o); @Override final int hashCode(); static final PeriodicalHealthChecksConfiguration DEFAULT_CONFIGURATION; }