MachineAddedBuildTriggerService extends BuildTriggerService { @NotNull @Override public String describeTrigger(@NotNull BuildTriggerDescriptor buildTriggerDescriptor) { return getBuildTrigger().describeTrigger(buildTriggerDescriptor); } MachineAddedBuildTriggerService(@NotNull final PluginDescriptor pluginDescriptor,
                                           @NotNull final CustomAsyncBuildTriggerFactory triggerFactory,
                                           @NotNull final AnalyticsTracker analyticsTracker,
                                           @NotNull final CacheManager cacheManager,
                                           @NotNull final MetricRegistry metricRegistry,
                                           @NotNull final BuildTriggerProperties buildTriggerProperties); @NotNull @Override String getName(); @NotNull @Override String getDisplayName(); @NotNull @Override String describeTrigger(@NotNull BuildTriggerDescriptor buildTriggerDescriptor); @NotNull @Override BuildTriggeringPolicy getBuildTriggeringPolicy(); @Override PropertiesProcessor getTriggerPropertiesProcessor(); @Override String getEditParametersUrl(); @Override boolean isMultipleTriggersPerBuildTypeAllowed();  }
@Test public void describe_trigger_returns_human_readable_string() throws Exception { MachineAddedBuildTriggerService sut = new MachineAddedBuildTriggerService(new FakePluginDescriptor(), new FakeAsyncBuildTriggerFactory(), new FakeAnalyticsTracker(), new FakeCacheManager(), new FakeMetricRegistry(), new FakeBuildTriggerProperties()); Assert.assertEquals(sut.describeTrigger(new FakeBuildTriggerDescriptor()), "Wait for a new machine to be added to server the-server."); }