### Question:
WebHookSettingsManagerImpl implements WebHookSettingsManager { @Override public List<WebHookSearchResult> findWebHooks(WebHookSearchFilter filter) { List<WebHookSearchResult> webhookResultList = new ArrayList<>(); for (WebHookConfigEnhanced e : this.webhooksEnhanced.values()) { addMatchingWebHook(filter, webhookResultList, e); } return webhookResultList; } 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 testFindWebHooksByTemplateFormat() { assertEquals(1, webHookSettingsManager.findWebHooks(WebHookSearchFilter.builder().formatShortName("jsonTemplate").build()).size()); assertEquals(0, webHookSettingsManager.findWebHooks(WebHookSearchFilter.builder().formatShortName("jsonVelocityTemplate").build()).size()); }
@Test public void testFindWebHooksByTemplateId() { assertEquals(1, webHookSettingsManager.findWebHooks(WebHookSearchFilter.builder().templateId("elasticsearch").build()).size()); assertEquals(0, webHookSettingsManager.findWebHooks(WebHookSearchFilter.builder().templateId("flowdock").build()).size()); }
@Test public void testFindWebHooksByUrlSubString() { assertEquals(1, webHookSettingsManager.findWebHooks(WebHookSearchFilter.builder().urlSubString("buildevent").build()).size()); assertEquals(0, webHookSettingsManager.findWebHooks(WebHookSearchFilter.builder().urlSubString("blahblah").build()).size()); }
@Test public void testFindWebHooksBySearch() { assertEquals(1, webHookSettingsManager.findWebHooks(WebHookSearchFilter.builder().textSearch("jsonTemplate").build()).size()); assertEquals(1, webHookSettingsManager.findWebHooks(WebHookSearchFilter.builder().textSearch("elasticsearch").build()).size()); assertEquals(1, webHookSettingsManager.findWebHooks(WebHookSearchFilter.builder().textSearch("buildevent").build()).size()); assertEquals(1, webHookSettingsManager.findWebHooks(WebHookSearchFilter.builder().textSearch("buildevent").build()).size()); assertEquals(0, webHookSettingsManager.findWebHooks(WebHookSearchFilter.builder().textSearch("blahblah").build()).size()); }