@Test
  public void testTarballStructure() throws IOException {
    // known content should produce known results
    List<String> actual = new ArrayList<>();
    try (TarArchiveInputStream input =
        new TarArchiveInputStream(Files.newInputStream(imageTar.toPath()))) {
      TarArchiveEntry imageEntry;
      while ((imageEntry = input.getNextTarEntry()) != null) {
        actual.add(imageEntry.getName());
      }
    }

    assertThat(actual)
        .containsExactly(
            "98682a867906d9d07cf3c51a4fb9e08e9d5baddd1ca5dc7834f58f434c9cb15c.tar.gz",
            "527db49d4e0c4159346119b4971d59016bfedceed874abab2b510ce433f6b15c.tar.gz",
            "16d03883198935b4119896dcea0ea14e1bf105b6ac0a35a88820d08bc0263306.tar.gz",
            "config.json",
            "manifest.json")
        .inOrder();
  }
Verify that created image has explicit directory structures, default timestamps, permissions, and
file orderings.
jib-core/src/integration-test/java/com/google/cloud/tools/jib/api/ReproducibleImageTest.java