@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?");
  }
Helper for reading back layers in a {@link BuildContext}.
jib-gradle-plugin/src/test/java/com/google/cloud/tools/jib/gradle/GradleProjectPropertiesTest.java