### Question:
TaskCommon { @Nullable static TaskProvider<Task> getBootWarTaskProvider(Project project) { if (project.getPlugins().hasPlugin("org.springframework.boot")) { try { return project.getTasks().named("bootWar"); } catch (UnknownTaskException ignored) { } } return null; } private  TaskCommon();  static final String VERSION_URL; }### Answer:
@Test public void testGetBootWarTask_bootWarProject() { Project project = ProjectBuilder.builder().build(); project.getPlugins().apply(WarPlugin.class); project.getPlugins().apply(SpringBootPlugin.class); TaskProvider<Task> bootWarTask = TaskCommon.getBootWarTaskProvider(project); Assert.assertNotNull(bootWarTask); Assert.assertNotNull(bootWarTask instanceof BootWar); }