@Test
  public void testGetMainClassFromJarAsPropertyWithValueNull_missing() {
    Property<String> mainClass = project.getObjects().property(String.class).value((String) null);

    Jar jar = project.getTasks().withType(Jar.class).getByName("jar");
    jar.setManifest(new DefaultManifest(null).attributes(ImmutableMap.of("Main-Class", mainClass)));

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