@Test
  public void testRunPluginExtensions_runtimeExceptionFromExtension() {
    FooExtension extension =
        new FooExtension(
            (buildPlan, properties, extraConfig, mavenData, logger) -> {
              throw new IndexOutOfBoundsException("buggy extension");
            });
    loadedExtensions = Arrays.asList(extension);

    try {
      mavenProjectProperties.runPluginExtensions(
          Arrays.asList(new FooExtensionConfig()), containerBuilder);
      Assert.fail();
    } catch (JibPluginExtensionException ex) {
      Assert.assertEquals(FooExtension.class, ex.getExtensionClass());
      Assert.assertEquals("extension crashed: buggy extension", ex.getMessage());
    }
  }
Plugin extension test for {@link MavenProjectProperties}.
jib-maven-plugin/src/test/java/com/google/cloud/tools/jib/maven/MavenProjectPropertiesExtensionTest.java