@Test
  public void testGetMainClassFromJar_success() {
    Jar jar = project.getTasks().withType(Jar.class).getByName("jar");
    jar.setManifest(
        new DefaultManifest(null).attributes(ImmutableMap.of("Main-Class", "some.main.class")));

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