@Test
  public void testBuildTarball()
      throws IOException, InterruptedException, ExecutionException, RegistryException,
          CacheDirectoryCreationException, InvalidImageReferenceException {
    Path outputPath = temporaryFolder.newFolder().toPath().resolve("test.tar");
    buildImage(
        ImageReference.of("gcr.io", "distroless/java", DISTROLESS_DIGEST),
        Containerizer.to(TarImage.at(outputPath).named("testtar")),
        Collections.emptyList());

    progressChecker.checkCompletion();

    new Command("docker", "load", "--input", outputPath.toString()).run();
    assertLayerSize(7, "testtar");
    Assert.assertEquals(
        "Hello, world. An argument.\n", new Command("docker", "run", "--rm", "testtar").run());
  }
Lists the files in the {@code resourcePath} resources directory and builds a {@link
FileEntriesLayer} from those files.
jib-core/src/integration-test/java/com/google/cloud/tools/jib/api/ContainerizerIntegrationTest.java