@VisibleForTesting
  static Instant getCreationTime(String configuredCreationTime, ProjectProperties projectProperties)
      throws DateTimeParseException, InvalidCreationTimeException {
    try {
      switch (configuredCreationTime) {
        case "EPOCH":
          return Instant.EPOCH;

        case "USE_CURRENT_TIMESTAMP":
          projectProperties.log(
              LogEvent.debug(
                  "Setting image creation time to current time; your image may not be reproducible."));
          return Instant.now();

        default:
          DateTimeFormatter formatter =
              new DateTimeFormatterBuilder()
                  .append(DateTimeFormatter.ISO_DATE_TIME) // parses isoStrict
                  // add ability to parse with no ":" in tz
                  .optionalStart()
                  .appendOffset("+HHmm", "+0000")
                  .optionalEnd()
                  .toFormatter();
          return formatter.parse(configuredCreationTime, Instant::from);
      }
    } catch (DateTimeParseException ex) {
      throw new InvalidCreationTimeException(configuredCreationTime, configuredCreationTime, ex);
    }
  }
@Test
  public void testGetCreationTime_invalidValue() {
    InvalidCreationTimeException exception =
        assertThrows(
            InvalidCreationTimeException.class,
            () ->
                PluginConfigurationProcessor.getCreationTime("invalid format", projectProperties));
    assertThat(exception).hasMessageThat().isEqualTo("invalid format");
    assertThat(exception.getInvalidCreationTime()).isEqualTo("invalid format");
  }