### Question:
WebHookSettingsManagerImpl implements WebHookSettingsManager { @Override public int getTemplateUsageCount(String templateId) { int count = 0; for (WebHookConfigEnhanced e : this.webhooksEnhanced.values()) { if (templateId.equalsIgnoreCase(e.getTemplateId())) { count++; } } return count; } WebHookSettingsManagerImpl(
			@NotNull final ProjectManager projectManager,
			@NotNull final ConfigActionFactory configActionFactory,
			@NotNull final ProjectSettingsManager projectSettingsManager,
			@NotNull final WebHookTemplateManager webHookTemplateManager,
			@NotNull final WebHookPayloadManager webHookPayloadManager,
			@NotNull final WebAddressTransformer webAddressTransformer); @Override void initialise(); @Override WebHookProjectSettings getSettings(String projectInternalId); @Override WebHookUpdateResult addNewWebHook(String projectInternalId, String projectExternalId, String url,
			Boolean enabled, BuildState buildState, String template, boolean buildTypeAll,
			boolean buildTypeSubProjects, Set<String> buildTypesEnabled, WebHookAuthConfig webHookAuthConfig); @Override WebHookUpdateResult deleteWebHook(String webHookId, String projectInternalId); @Override WebHookUpdateResult updateWebHook(String projectInternalId, String webHookId, String url, Boolean enabled,
			BuildState buildState, String template, boolean buildTypeAll, boolean buildSubProjects,
			Set<String> buildTypesEnabled, WebHookAuthConfig webHookAuthConfig); @Override boolean iswebHooksEnabledForProject(String projectInternalId); @Override List<WebHookConfig> getWebHooksConfigs(String projectInternalId); @Override int getTemplateUsageCount(String templateId); @Override List<WebHookSearchResult> findWebHooks(WebHookSearchFilter filter); @Override Map<String, List<WebHookSearchResult>> findWebHooksByProject(WebHookSearchFilter filter); @Override Map<SProject, List<WebHookConfigEnhanced>> getWebHooksForProjects(List<SProject> sProjects); Map<SProject, List<WebHookConfigEnhanced>> getWebHooksForBuild(List<SProject> sProjects, SBuildType sBuildType);  }### Answer:
@Test public void testGetTemplateUsageCount() { assertEquals(1, webHookSettingsManager.getTemplateUsageCount("elasticsearch")); assertEquals(0, webHookSettingsManager.getTemplateUsageCount("something")); }