Repository: GoogleContainerTools/jib
File: jib-gradle-plugin/src/test/java/com/google/cloud/tools/jib/gradle/JibPluginTest.java (Java)

Code before:
            () -> testProject.build(JibPlugin.BUILD_IMAGE_TASK_NAME, "-Djib.console=plain"));

    String output = exception.getBuildResult().getOutput();
    assertThat(output)
        .contains(
            "Containerizing application to updated-image, updated-image:updated-tag, updated-image:tag2");
  }

  @Test
  public void testLazyEvalForLabels() {
    BuildResult showLabels = testProject.build("showlabels", "-Djib.console=plain");
    assertThat(showLabels.getOutput())
        .contains(
            "labels contain values [firstkey:updated-first-label, secondKey:updated-second-label]");
  }

  @Test
  public void testLazyEvalForExtraDirectories() {
    BuildResult checkExtraDirectories =
        testProject.build("check-extra-directories", "-Djib.console=plain");
    assertThat(checkExtraDirectories.getOutput()).contains("[/updated:755]");
    assertThat(checkExtraDirectories.getOutput()).contains("updated-custom-extra-dir");
  }

  @Test
  public void testLazyEvalForExtraDirectories_IndividualPaths() {
    BuildResult checkExtraDirectories =
        testProject.build(
            "check-extra-directories", "-b=build-extra-dirs.gradle", "-Djib.console=plain");
    assertThat(checkExtraDirectories.getOutput()).contains("updated-custom-extra-dir");
    assertThat(checkExtraDirectories.getOutput())
        .contains("extraDirectories (into): [/updated-custom-into-dir]");
    assertThat(checkExtraDirectories.getOutput())
        .contains("extraDirectories (includes): [[include.txt]]");
    assertThat(checkExtraDirectories.getOutput())
        .contains("extraDirectories (excludes): [[exclude.txt]]");
  }

  private Project createProject(String... plugins) {
    Project project =
        ProjectBuilder.builder().withProjectDir(testProjectRoot.getRoot()).withName("root").build();
    Arrays.asList(plugins).forEach(project.getPluginManager()::apply);
    return project;
  }
}


Review comment (suggestion):
super nit:
```suggestion
  public void testLazyEvalForExtraDirectories_individualPaths() {
```

Code after:
            () -> testProject.build(JibPlugin.BUILD_IMAGE_TASK_NAME, "-Djib.console=plain"));

    String output = exception.getBuildResult().getOutput();
    assertThat(output)
        .contains(
            "Containerizing application to updated-image, updated-image:updated-tag, updated-image:tag2");
  }

  @Test
  public void testLazyEvalForLabels() {
    BuildResult showLabels = testProject.build("showlabels", "-Djib.console=plain");
    assertThat(showLabels.getOutput())
        .contains(
            "labels contain values [firstkey:updated-first-label, secondKey:updated-second-label]");
  }

  @Test
  public void testLazyEvalForExtraDirectories() {
    BuildResult checkExtraDirectories =
        testProject.build("check-extra-directories", "-Djib.console=plain");
    assertThat(checkExtraDirectories.getOutput()).contains("[/updated:755]");
    assertThat(checkExtraDirectories.getOutput()).contains("updated-custom-extra-dir");
  }

  @Test
  public void testLazyEvalForExtraDirectories_individualPaths() throws IOException {
    BuildResult checkExtraDirectories =
        testProject.build(
            "check-extra-directories", "-b=build-extra-dirs.gradle", "-Djib.console=plain");

    Path extraDirectoryPath =
        testProject
            .getProjectRoot()
            .resolve("src")
            .resolve("main")
            .resolve("updated-custom-extra-dir")
            .toRealPath();
    assertThat(checkExtraDirectories.getOutput())
        .contains("extraDirectories (from): [" + extraDirectoryPath + "]");
    assertThat(checkExtraDirectories.getOutput())
        .contains("extraDirectories (into): [/updated-custom-into-dir]");
    assertThat(checkExtraDirectories.getOutput())
        .contains("extraDirectories (includes): [[include.txt]]");
    assertThat(checkExtraDirectories.getOutput())
        .contains("extraDirectories (excludes): [[exclude.txt]]");
  }

  private Project createProject(String... plugins) {
    Project project =
        ProjectBuilder.builder().withProjectDir(testProjectRoot.getRoot()).withName("root").build();
    Arrays.asList(plugins).forEach(project.getPluginManager()::apply);