Repository: GoogleContainerTools/jib
File: jib-plugins-common/src/test/java/com/google/cloud/tools/jib/plugins/common/PluginConfigurationProcessorTest.java (Java)

Code before:
  @Test
  public void testEntrypoint_warningOnMainclass()
      throws InvalidImageReferenceException, IOException, CacheDirectoryCreationException,
          MainClassInferenceException, InvalidAppRootException, InvalidWorkingDirectoryException,
          InvalidPlatformException, InvalidContainerVolumeException,
          IncompatibleBaseImageJavaVersionException, NumberFormatException,
          InvalidContainerizingModeException, InvalidFilesModificationTimeException,
          InvalidCreationTimeException {
    Mockito.when(rawConfiguration.getEntrypoint())
        .thenReturn(Optional.of(Arrays.asList("custom", "entrypoint")));
    Mockito.when(rawConfiguration.getMainClass()).thenReturn(Optional.of("java.util.Object"));

    BuildContext buildContext = getBuildContext(processCommonConfiguration());

    Assert.assertEquals(
        Arrays.asList("custom", "entrypoint"),
        buildContext.getContainerConfiguration().getEntrypoint());
    Mockito.verify(projectProperties)
        .log(
            LogEvent.warn(
                "mainClass, extraClasspath, jvmFlags, and expandClasspathDependencies are ignored "
                    + "when entrypoint is specified"));
  }

  @Test
  public void testEntrypoint_warningExpandClasspathDependencies()
      throws InvalidImageReferenceException, IOException, CacheDirectoryCreationException,
          MainClassInferenceException, InvalidAppRootException, InvalidWorkingDirectoryException,
          InvalidPlatformException, InvalidContainerVolumeException,
          IncompatibleBaseImageJavaVersionException, NumberFormatException,
          InvalidContainerizingModeException, InvalidFilesModificationTimeException,
          InvalidCreationTimeException {
    Mockito.when(rawConfiguration.getEntrypoint())
        .thenReturn(Optional.of(Arrays.asList("custom", "entrypoint")));
    Mockito.when(rawConfiguration.getExpandClasspathDependencies()).thenReturn(true);

    BuildContext buildContext = getBuildContext(processCommonConfiguration());

    Assert.assertEquals(
        Arrays.asList("custom", "entrypoint"),
        buildContext.getContainerConfiguration().getEntrypoint());
    Mockito.verify(projectProperties)
        .log(
            LogEvent.warn(
                "mainClass, extraClasspath, jvmFlags, and expandClasspathDependencies are ignored "
                    + "when entrypoint is specified"));
  }

  @Test
  public void testEntrypoint_warningOnMainclassForWar()
      throws IOException, InvalidCreationTimeException, InvalidImageReferenceException,

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

Code after:
  @Test
  public void testEntrypoint_warningOnMainclass()
      throws InvalidImageReferenceException, IOException, CacheDirectoryCreationException,
          MainClassInferenceException, InvalidAppRootException, InvalidWorkingDirectoryException,
          InvalidPlatformException, InvalidContainerVolumeException,
          IncompatibleBaseImageJavaVersionException, NumberFormatException,
          InvalidContainerizingModeException, InvalidFilesModificationTimeException,
          InvalidCreationTimeException {
    Mockito.when(rawConfiguration.getEntrypoint())
        .thenReturn(Optional.of(Arrays.asList("custom", "entrypoint")));
    Mockito.when(rawConfiguration.getMainClass()).thenReturn(Optional.of("java.util.Object"));

    BuildContext buildContext = getBuildContext(processCommonConfiguration());

    Assert.assertEquals(
        Arrays.asList("custom", "entrypoint"),
        buildContext.getContainerConfiguration().getEntrypoint());
    Mockito.verify(projectProperties)
        .log(
            LogEvent.warn(
                "mainClass, extraClasspath, jvmFlags, and expandClasspathDependencies are ignored "
                    + "when entrypoint is specified"));
  }

  @Test
  public void testEntrypoint_warningOnExpandClasspathDependencies()
      throws InvalidImageReferenceException, IOException, CacheDirectoryCreationException,
          MainClassInferenceException, InvalidAppRootException, InvalidWorkingDirectoryException,
          InvalidPlatformException, InvalidContainerVolumeException,
          IncompatibleBaseImageJavaVersionException, NumberFormatException,
          InvalidContainerizingModeException, InvalidFilesModificationTimeException,
          InvalidCreationTimeException {
    Mockito.when(rawConfiguration.getEntrypoint())
        .thenReturn(Optional.of(Arrays.asList("custom", "entrypoint")));
    Mockito.when(rawConfiguration.getExpandClasspathDependencies()).thenReturn(true);

    BuildContext buildContext = getBuildContext(processCommonConfiguration());

    Assert.assertEquals(
        Arrays.asList("custom", "entrypoint"),
        buildContext.getContainerConfiguration().getEntrypoint());
    Mockito.verify(projectProperties)
        .log(
            LogEvent.warn(
                "mainClass, extraClasspath, jvmFlags, and expandClasspathDependencies are ignored "
                    + "when entrypoint is specified"));
  }

  @Test
  public void testEntrypoint_warningOnMainclassForWar()
      throws IOException, InvalidCreationTimeException, InvalidImageReferenceException,