@Test
void testClean_tooNew() throws IOException {

    final String repoDir = FileUtil.getCanonicalPath(Files.createTempDirectory("stroom").resolve("repo2"));
    // big delay to prevent deletion
    int cleanDelayMs = (int) Duration.ofHours(1).toMillis();
    StroomZipRepository stroomZipRepository = new StroomZipRepository(
            repoDir, null, false, 10000, cleanDelayMs, false);
    Path repoDirPath = Paths.get(repoDir);
    assertThat(repoDirPath).exists();
    stroomZipRepository.clean(false);
    assertThat(repoDirPath).exists();
    // Dir is within the cleanDelayMs so it won't be deleted
    stroomZipRepository.clean(true);
    assertThat(repoDirPath).exists();
}