static void buildAndRunAdditionalTag(
      TestProject testProject, String imageReference, String additionalTag, String expectedOutput)
      throws InvalidImageReferenceException, IOException, InterruptedException, DigestException {
    BuildResult buildResult =
        testProject.build(
            "clean",
            "jib",
            "-Djib.useOnlyProjectCache=true",
            "-Djib.console=plain",
            "-D_TARGET_IMAGE=" + imageReference,
            "-Djib.allowInsecureRegistries=" + imageReference.startsWith("localhost"),
            "-D_ADDITIONAL_TAG=" + additionalTag);
    assertBuildSuccess(buildResult, "jib", "Built and pushed image as ");
    assertThatExpectedImageDigestAndIdReturned(testProject.getProjectRoot());
    MatcherAssert.assertThat(buildResult.getOutput(), CoreMatchers.containsString(imageReference));

    String additionalImageReference =
        ImageReference.parse(imageReference).withQualifier(additionalTag).toString();
    MatcherAssert.assertThat(
        buildResult.getOutput(), CoreMatchers.containsString(additionalImageReference));

    Assert.assertEquals(expectedOutput, pullAndRunBuiltImage(imageReference));
    Assert.assertEquals(expectedOutput, pullAndRunBuiltImage(additionalImageReference));
    assertThat(getCreationTime(imageReference)).isEqualTo(Instant.EPOCH);
    assertThat(getCreationTime(additionalImageReference)).isEqualTo(Instant.EPOCH);
  }
Helper class to run integration tests.
jib-gradle-plugin/src/integration-test/java/com/google/cloud/tools/jib/gradle/JibRunHelper.java