### Question:
GwtPlugin implements Plugin<Project> { @Override public void apply(final Project project) { project.getPlugins().apply(GwtCompilerPlugin.class); project.getPlugins().withType(WarPlugin.class, (warPlugin) -> project.getPlugins().apply(GwtWarPlugin.class)); }  @Override void apply(final Project project);  }### Answer:
@Test public void testWarTasksAvailable() { project.getPlugins().apply(WarPlugin.class); assertThat(tasks.getByName(GwtWarPlugin.TASK_WAR_TEMPLATE), instanceOf(Copy.class)); assertThat(tasks.getByName(GwtWarPlugin.TASK_GWT_DEV), instanceOf(GwtDev.class)); assertThat(tasks.getByName(GwtWarPlugin.TASK_DRAFT_WAR), instanceOf(War.class)); }
@Test public void testEclipseSetup() { project.getPlugins().apply(EclipsePlugin.class); final EclipseModel eclipseModel = project.getExtensions().getByType(EclipseModel.class); assertThat(eclipseModel.getProject().getNatures(), hasItem(GwtEclipsePlugin.ECLIPSE_NATURE)); assertThat(eclipseModel.getProject().getBuildCommands(), hasItem(new BuildCommand(GwtEclipsePlugin.ECLIPSE_BUILDER_PROJECT_VALIDATOR))); assertThat(eclipseModel.getProject().getBuildCommands(), not(hasItem(new BuildCommand(GwtEclipsePlugin.ECLIPSE_BUILDER_WEBAPP_VALIDATOR)))); project.getPlugins().apply(WarPlugin.class); assertThat(eclipseModel.getProject().getBuildCommands(), hasItem(new BuildCommand(GwtEclipsePlugin.ECLIPSE_BUILDER_WEBAPP_VALIDATOR))); }