@Test
  public void testBuild_tarBase() throws IOException, InterruptedException, DigestException {
    Path path = temporaryFolder.getRoot().toPath().resolve("docker-save-distroless");
    new Command("docker", "save", "gcr.io/distroless/java:latest", "-o", path.toString()).run();
    String targetImage =
        IntegrationTestingConfiguration.getTestRepositoryLocation()
            + "/simplewithtarbase:gradle"
            + System.nanoTime();
    String output = JibRunHelper.buildAndRunFromLocalBase(targetImage, "tar://" + path);

    assertThat(ImmutableList.copyOf(output.split("\n")))
        .containsExactly(
            "Hello, world. An argument.",
            "1970-01-01T00:00:01Z",
            "rw-r--r--",
            "rw-r--r--",
            "foo",
            "cat",
            "1970-01-01T00:00:01Z",
            "1970-01-01T00:00:01Z");
  }
Asserts that the test project has the required exposed ports, labels and volumes.

@param imageReference the image to test
@throws IOException if the {@code docker inspect} command fails to run
@throws InterruptedException if the {@code docker inspect} command is interrupted
jib-gradle-plugin/src/integration-test/java/com/google/cloud/tools/jib/gradle/SingleProjectIntegrationTest.java