public static void extract(Path source, Path destination) throws IOException {
    extract(source, destination, false);
  }
@Test
  public void testExtract_reproducibleTimestampsEnabled() throws URISyntaxException, IOException {
    // The tarfile has only level1/level2/level3/file.txt packaged
    Path source = Paths.get(Resources.getResource("core/tarfile-only-file-packaged.tar").toURI());

    Path destination = temporaryFolder.getRoot().toPath();

    TarExtractor.extract(source, destination, true);

    assertThat(
            Files.getLastModifiedTime(destination.resolve("level-1"))
                .toInstant()
                .truncatedTo(ChronoUnit.SECONDS))
        .isEqualTo(FileTime.fromMillis(1000L).toInstant());
    assertThat(
            Files.getLastModifiedTime(destination.resolve("level-1/level-2"))
                .toInstant()
                .truncatedTo(ChronoUnit.SECONDS))
        .isEqualTo(FileTime.fromMillis(1000L).toInstant());
    assertThat(
            Files.getLastModifiedTime(destination.resolve("level-1/level-2/level-3"))
                .toInstant()
                .truncatedTo(ChronoUnit.SECONDS))
        .isEqualTo(FileTime.fromMillis(1000L).toInstant());
    assertThat(
            Files.getLastModifiedTime(destination.resolve("level-1/level-2/level-3/file.txt"))
                .toInstant()
                .truncatedTo(ChronoUnit.SECONDS))
        .isEqualTo(Instant.parse("2021-01-29T21:10:02Z"));
  }