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

Code before:
    convention.setTargetCompatibility(JavaVersion.VERSION_1_3);
    assertThat(gradleProjectProperties.getMajorJavaVersion()).isEqualTo(3);

    convention.setTargetCompatibility(JavaVersion.VERSION_11);
    assertThat(gradleProjectProperties.getMajorJavaVersion()).isEqualTo(11);

    convention.setTargetCompatibility(JavaVersion.VERSION_1_9);
    assertThat(gradleProjectProperties.getMajorJavaVersion()).isEqualTo(9);
  }

  @Test
  public void testGetMajorJavaVersion_jvm8() {
    Assume.assumeThat(JavaVersion.current(), CoreMatchers.is(JavaVersion.VERSION_1_8));

    assertThat(gradleProjectProperties.getMajorJavaVersion()).isEqualTo(8);
  }

  @Test
  public void testGetMajorJavaVersion_jvm11() {
    Assume.assumeThat(JavaVersion.current(), CoreMatchers.is(JavaVersion.VERSION_11));

    assertThat(gradleProjectProperties.getMajorJavaVersion()).isEqualTo(11);
  }

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

    Path applicationDirectory = getResource("gradle/application");
    assertThat(layers.snapshotsLayer.getEntries())
        .comparingElementsUsing(SOURCE_FILE_OF)
        .containsExactly(
            applicationDirectory.resolve("dependencies/dependencyX-1.0.0-SNAPSHOT.jar"));
    assertThat(layers.dependenciesLayer.getEntries())
        .comparingElementsUsing(SOURCE_FILE_OF)
        .containsExactly(
            applicationDirectory.resolve("dependencies/dependency-1.0.0.jar"),
            applicationDirectory.resolve("dependencies/more/dependency-1.0.0.jar"),
            applicationDirectory.resolve("dependencies/another/one/dependency-1.0.0.jar"),
            applicationDirectory.resolve("dependencies/libraryA.jar"),
            applicationDirectory.resolve("dependencies/libraryB.jar"),
            applicationDirectory.resolve("dependencies/library.jarC.jar"));
    assertThat(layers.resourcesLayer.getEntries())
        .comparingElementsUsing(SOURCE_FILE_OF)
        .containsExactly(
            applicationDirectory.resolve("build/resources/main/resourceA"),
            applicationDirectory.resolve("build/resources/main/resourceB"),
            applicationDirectory.resolve("build/resources/main/world"));
    assertThat(layers.classesLayer.getEntries())
        .comparingElementsUsing(SOURCE_FILE_OF)

Review comment (suggestion):
```suggestion
  public void testCreateContainerBuilder_correctSourceFiles()
```

Code after:
    convention.setTargetCompatibility(JavaVersion.VERSION_1_3);
    assertThat(gradleProjectProperties.getMajorJavaVersion()).isEqualTo(3);

    convention.setTargetCompatibility(JavaVersion.VERSION_11);
    assertThat(gradleProjectProperties.getMajorJavaVersion()).isEqualTo(11);

    convention.setTargetCompatibility(JavaVersion.VERSION_1_9);
    assertThat(gradleProjectProperties.getMajorJavaVersion()).isEqualTo(9);
  }

  @Test
  public void testGetMajorJavaVersion_jvm8() {
    Assume.assumeThat(JavaVersion.current(), CoreMatchers.is(JavaVersion.VERSION_1_8));

    assertThat(gradleProjectProperties.getMajorJavaVersion()).isEqualTo(8);
  }

  @Test
  public void testGetMajorJavaVersion_jvm11() {
    Assume.assumeThat(JavaVersion.current(), CoreMatchers.is(JavaVersion.VERSION_11));

    assertThat(gradleProjectProperties.getMajorJavaVersion()).isEqualTo(11);
  }

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

    Path applicationDirectory = getResource("gradle/application");
    assertThat(layers.snapshotsLayer.getEntries())
        .comparingElementsUsing(SOURCE_FILE_OF)
        .containsExactly(
            applicationDirectory.resolve("dependencies/dependencyX-1.0.0-SNAPSHOT.jar"));
    assertThat(layers.dependenciesLayer.getEntries())
        .comparingElementsUsing(SOURCE_FILE_OF)
        .containsExactly(
            applicationDirectory.resolve("dependencies/dependency-1.0.0.jar"),
            applicationDirectory.resolve("dependencies/more/dependency-1.0.0.jar"),
            applicationDirectory.resolve("dependencies/another/one/dependency-1.0.0.jar"),
            applicationDirectory.resolve("dependencies/libraryA.jar"),
            applicationDirectory.resolve("dependencies/libraryB.jar"),
            applicationDirectory.resolve("dependencies/library.jarC.jar"));
    assertThat(layers.resourcesLayer.getEntries())
        .comparingElementsUsing(SOURCE_FILE_OF)
        .containsExactly(
            applicationDirectory.resolve("build/resources/main/resourceA"),
            applicationDirectory.resolve("build/resources/main/resourceB"),
            applicationDirectory.resolve("build/resources/main/world"));
    assertThat(layers.classesLayer.getEntries())
        .comparingElementsUsing(SOURCE_FILE_OF)