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

Code before:
  public void testConfigurationName() {
    assertThat(testJibExtension.getConfigurationName().get()).isEqualTo("runtimeClasspath");
  }

  @Test
  public void testExtraDirectories_default() {
    assertThat(testJibExtension.getExtraDirectories().getPaths()).hasSize(1);
    assertThat(testJibExtension.getExtraDirectories().getPaths().get(0).getFrom())
        .isEqualTo(fakeProject.getProjectDir().toPath().resolve("src/main/jib"));
    assertThat(testJibExtension.getExtraDirectories().getPermissions().get()).isEmpty();
  }

  @Test
  public void testExtraDirectories() {
    testJibExtension.extraDirectories(
        extraDirectories -> {
          extraDirectories.setPaths("test/path");
        });

    assertThat(testJibExtension.getExtraDirectories().getPaths()).hasSize(1);
    assertThat(testJibExtension.getExtraDirectories().getPaths().get(0).getFrom())
        .isEqualTo(fakeProject.getProjectDir().toPath().resolve("test/path"));
  }

  @Test
  public void testExtraDirectories_lazySetFromInto() {
    testJibExtension.extraDirectories(
        extraDirectories ->
            extraDirectories.paths(
                paths -> {
                  ProviderFactory providerFactory = fakeProject.getProviders();
                  Provider<Object> from = providerFactory.provider(() -> "test/path");
                  Provider<String> into = providerFactory.provider(() -> "/target");
                  paths.path(
                      path -> {
                        path.setFrom(from);
                        path.setInto(into);
                      });
                }));

    assertThat(testJibExtension.getExtraDirectories().getPaths()).hasSize(1);
    assertThat(testJibExtension.getExtraDirectories().getPaths().get(0).getFrom())
        .isEqualTo(fakeProject.getProjectDir().toPath().resolve("test/path"));
    assertThat(testJibExtension.getExtraDirectories().getPaths().get(0).getInto())
        .isEqualTo("/target");
  }

  @Test
  public void testExtraDirectories_withTarget() {
    testJibExtension.extraDirectories(
        extraDirectories ->

Review comment (suggestion):
```suggestion
  public void testExtraDirectories_lazyEvaluation_setFromInto() {
```

Code after:
  public void testConfigurationName() {
    assertThat(testJibExtension.getConfigurationName().get()).isEqualTo("runtimeClasspath");
  }

  @Test
  public void testExtraDirectories_default() {
    assertThat(testJibExtension.getExtraDirectories().getPaths()).hasSize(1);
    assertThat(testJibExtension.getExtraDirectories().getPaths().get(0).getFrom())
        .isEqualTo(fakeProject.getProjectDir().toPath().resolve("src/main/jib"));
    assertThat(testJibExtension.getExtraDirectories().getPermissions().get()).isEmpty();
  }

  @Test
  public void testExtraDirectories() {
    testJibExtension.extraDirectories(
        extraDirectories -> {
          extraDirectories.setPaths("test/path");
        });

    assertThat(testJibExtension.getExtraDirectories().getPaths()).hasSize(1);
    assertThat(testJibExtension.getExtraDirectories().getPaths().get(0).getFrom())
        .isEqualTo(fakeProject.getProjectDir().toPath().resolve("test/path"));
  }

  @Test
  public void testExtraDirectories_lazyEvaluation_setFromInto() {
    testJibExtension.extraDirectories(
        extraDirectories ->
            extraDirectories.paths(
                paths -> {
                  ProviderFactory providerFactory = fakeProject.getProviders();
                  Provider<Object> from = providerFactory.provider(() -> "test/path");
                  Provider<String> into = providerFactory.provider(() -> "/target");
                  paths.path(
                      path -> {
                        path.setFrom(from);
                        path.setInto(into);
                      });
                }));

    assertThat(testJibExtension.getExtraDirectories().getPaths()).hasSize(1);
    assertThat(testJibExtension.getExtraDirectories().getPaths().get(0).getFrom())
        .isEqualTo(fakeProject.getProjectDir().toPath().resolve("test/path"));
    assertThat(testJibExtension.getExtraDirectories().getPaths().get(0).getInto())
        .isEqualTo("/target");
  }

  @Test
  public void testExtraDirectories_withTarget() {
    testJibExtension.extraDirectories(
        extraDirectories ->