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

Code before:
  @Test
  public void testCreateContainerBuilder_noClassesFiles()
      throws InvalidImageReferenceException, IOException {
    Project project =
        ProjectBuilder.builder()
            .withProjectDir(temporaryFolder.newFolder())
            .withGradleUserHomeDir(temporaryFolder.newFolder())
            .build();
    project.getPlugins().apply("java");

    gradleProjectProperties =
        new GradleProjectProperties(
            project,
            mockLogger,
            mockTempDirectoryProvider,
            mockExtensionLoader,
            JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME);

    gradleProjectProperties.createJibContainerBuilder(
        JavaContainerBuilder.from(RegistryImage.named("base")), ContainerizingMode.EXPLODED);
    gradleProjectProperties.waitForLoggingThread();
    verify(mockLogger).warn("No classes files were found - did you compile your project?");
  }

  @Test
  public void testCreateContainerBuilder_extractionPaths()
      throws InvalidImageReferenceException, CacheDirectoryCreationException {
    ContainerBuilderLayers layers = new ContainerBuilderLayers(setupBuildContext());

    assertThat(layers.dependenciesLayer.getEntries())
        .comparingElementsUsing(EXTRACTION_PATH_OF)
        .containsExactly(
            "/my/app/libs/dependency-1.0.0-770.jar",
            "/my/app/libs/dependency-1.0.0-200.jar",
            "/my/app/libs/dependency-1.0.0-480.jar",
            "/my/app/libs/libraryA.jar",
            "/my/app/libs/libraryB.jar",
            "/my/app/libs/library.jarC.jar");
    assertThat(layers.snapshotsLayer.getEntries())
        .comparingElementsUsing(EXTRACTION_PATH_OF)
        .containsExactly("/my/app/libs/dependencyX-1.0.0-SNAPSHOT.jar");
    assertThat(layers.resourcesLayer.getEntries())
        .comparingElementsUsing(EXTRACTION_PATH_OF)
        .containsExactly(
            "/my/app/resources/resourceA",
            "/my/app/resources/resourceB",
            "/my/app/resources/world");
    assertThat(layers.classesLayer.getEntries())
        .comparingElementsUsing(EXTRACTION_PATH_OF)
        .containsExactly("/my/app/classes/HelloWorld.class", "/my/app/classes/some.class");
  }

Review comment (refactor):
```suggestion
  public void testCreateContainerBuilder_correctExtractionPaths()
```

Code after:
  @Test
  public void testCreateContainerBuilder_noClassesFiles()
      throws InvalidImageReferenceException, IOException {
    Project project =
        ProjectBuilder.builder()
            .withProjectDir(temporaryFolder.newFolder())
            .withGradleUserHomeDir(temporaryFolder.newFolder())
            .build();
    project.getPlugins().apply("java");

    gradleProjectProperties =
        new GradleProjectProperties(
            project,
            mockLogger,
            mockTempDirectoryProvider,
            mockExtensionLoader,
            JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME);

    gradleProjectProperties.createJibContainerBuilder(
        JavaContainerBuilder.from(RegistryImage.named("base")), ContainerizingMode.EXPLODED);
    gradleProjectProperties.waitForLoggingThread();
    verify(mockLogger).warn("No classes files were found - did you compile your project?");
  }

  @Test
  public void testCreateContainerBuilder_correctExtractionPaths()
      throws InvalidImageReferenceException, CacheDirectoryCreationException {
    ContainerBuilderLayers layers = new ContainerBuilderLayers(setupBuildContext());

    assertThat(layers.dependenciesLayer.getEntries())
        .comparingElementsUsing(EXTRACTION_PATH_OF)
        .containsExactly(
            "/my/app/libs/dependency-1.0.0-770.jar",
            "/my/app/libs/dependency-1.0.0-200.jar",
            "/my/app/libs/dependency-1.0.0-480.jar",
            "/my/app/libs/libraryA.jar",
            "/my/app/libs/libraryB.jar",
            "/my/app/libs/library.jarC.jar");
    assertThat(layers.snapshotsLayer.getEntries())
        .comparingElementsUsing(EXTRACTION_PATH_OF)
        .containsExactly("/my/app/libs/dependencyX-1.0.0-SNAPSHOT.jar");
    assertThat(layers.resourcesLayer.getEntries())
        .comparingElementsUsing(EXTRACTION_PATH_OF)
        .containsExactly(
            "/my/app/resources/resourceA",
            "/my/app/resources/resourceB",
            "/my/app/resources/world");
    assertThat(layers.classesLayer.getEntries())
        .comparingElementsUsing(EXTRACTION_PATH_OF)
        .containsExactly("/my/app/classes/HelloWorld.class", "/my/app/classes/some.class");
  }