@Test
  public void testToJibContainerBuilder_mainClassNull()
      throws IOException, InvalidImageReferenceException, CacheDirectoryCreationException,
          URISyntaxException {
    BuildContext buildContext =
        JavaContainerBuilder.from("scratch")
            .addClasses(getResource("core/application/classes/"))
            .toContainerBuilder()
            .toBuildContext(Containerizer.to(RegistryImage.named("hello")));
    Assert.assertNull(buildContext.getContainerConfiguration().getEntrypoint());

    try {
      JavaContainerBuilder.from("scratch").addJvmFlags("-flag1", "-flag2").toContainerBuilder();
      Assert.fail();

    } catch (IllegalStateException ex) {
      Assert.assertEquals(
          "Failed to construct entrypoint on JavaContainerBuilder; jvmFlags were set, but "
              + "mainClass is null. Specify the main class using "
              + "JavaContainerBuilder#setMainClass(String), or consider using MainClassFinder to "
              + "infer the main class.",
          ex.getMessage());
    }
  }
Gets the extraction paths in the specified layer of a give {@link BuildContext}.
jib-core/src/test/java/com/google/cloud/tools/jib/api/JavaContainerBuilderTest.java