MailetUtil { public static Optional<Boolean> getInitParameter(MailetConfig config, String name) { String value = config.getInitParameter(name); if ("true".equalsIgnoreCase(value)) { return Optional.of(true); } if ("false".equalsIgnoreCase(value)) { return Optional.of(false); } return Optional.empty(); }  static Optional<Boolean> getInitParameter(MailetConfig config, String name); static int getInitParameterAsStrictlyPositiveInteger(String condition, int defaultValue); static int getInitParameterAsStrictlyPositiveInteger(String condition);  }
@Test void getInitParameterShouldReturnAbsentWhenNull() { FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .build(); assertThat(MailetUtil.getInitParameter(mailetConfig, A_PARAMETER)).isEmpty(); }