TowtruckApp { @Bean Supplier<String> keySupplier(Clock clock, @Value("${s3.keyPrefix}") String keyPrefix) { return () -> { long millis = clock.millis(); String date = ISODateTimeFormat.date().withZoneUTC().print(millis); String time = ISODateTimeFormat.basicDateTimeNoMillis().withZoneUTC().print(millis); return String.format("%s/%s/%s.json.gz", keyPrefix, date, time); }; }  @Bean ObjectMapper mapper(); @Bean Map<String, JsonNode> store(
      @Value("${kafka.bootstrapServers}") String bootstrapServers,
      @Value("${kafka.road.topic}") String topic,
      Serializer<String, JsonNode> serializer); static void main(String[] args);  }
@Test public void keySupplier() { Clock clock = Clock.fixed(Instant.ofEpochMilli(1493905649163L), ZoneOffset.UTC); String result = underTest.keySupplier(clock, "keyPrefix").get(); assertThat(result, is("keyPrefix/2017-05-04/20170504T134729Z.json.gz")); }