IssueQueryResult issueQueryResult = mock(DefaultIssueQueryResult.class);
when(issueQueryResult.first()).thenReturn(issue);
Component project = mock(Component.class);
when(issueQueryResult.component(issue)).thenReturn(project);
when(finder.find(any(IssueQuery.class))).thenReturn(issueQueryResult);
<BUG>actions.add(Action.builder("link-to-jira").conditions(new AlwaysMatch()).functions(function1, function2).build());
</BUG>
assertThat(actionService.execute("ABCD", "link-to-jira", mock(UserSession.class))).isNotNull();
verify(function1).execute(any(Function.Context.class));
verify(function2).execute(any(Function.Context.class));

IssueQueryResult issueQueryResult = mock(DefaultIssueQueryResult.class);
when(issueQueryResult.first()).thenReturn(issue);
Component project = mock(Component.class);
when(issueQueryResult.component(issue)).thenReturn(project);
when(finder.find(any(IssueQuery.class))).thenReturn(issueQueryResult);
actions.add("link-to-jira").setConditions(new AlwaysMatch()).setFunctions(function1, function2);
assertThat(actionService.execute("ABCD", "link-to-jira", mock(UserSession.class))).isNotNull();
verify(function1).execute(any(Function.Context.class));
verify(function2).execute(any(Function.Context.class));
