@Test
  public void testGetMainClassFromJar_success() {
    when(mockMavenProject.getPlugin("org.apache.maven.plugins:maven-jar-plugin"))
        .thenReturn(mockPlugin);
    when(mockPlugin.getConfiguration()).thenReturn(pluginConfiguration);
    Xpp3Dom archive = new Xpp3Dom("archive");
    Xpp3Dom manifest = new Xpp3Dom("manifest");
    pluginConfiguration.addChild(archive);
    archive.addChild(manifest);
    manifest.addChild(newXpp3Dom("mainClass", "some.main.class"));

    assertThat(mavenProjectProperties.getMainClassFromJarPlugin()).isEqualTo("some.main.class");
  }
Helper for reading back layers in a {@link BuildContext}.
jib-maven-plugin/src/test/java/com/google/cloud/tools/jib/maven/MavenProjectPropertiesTest.java