String getWarFilePath() {
    TaskProvider<Task> bootWarTask = TaskCommon.getBootWarTaskProvider(project);
    if (bootWarTask != null && bootWarTask.get().getEnabled()) {
      return bootWarTask.get().getOutputs().getFiles().getAsPath();
    }

    TaskProvider<Task> warTask = TaskCommon.getWarTaskProvider(project);
    return Verify.verifyNotNull(warTask).get().getOutputs().getFiles().getAsPath();
  }
@Test
  public void testGetWarFilePath_bootWar() throws IOException {
    Path outputDir = temporaryFolder.newFolder("output").toPath();

    project.getPlugins().apply("war");
    project.getPlugins().apply("org.springframework.boot");
    War bootWar = project.getTasks().withType(War.class).getByName("bootWar");
    bootWar.getDestinationDirectory().set(outputDir.toFile());

    assertThat(gradleProjectProperties.getWarFilePath())
        .isEqualTo(outputDir.resolve("my-app.war").toString());
  }