### Question:
ProjectMetricsFactory { protected ColumnFilter createProjectFilter(WorkspaceProject project) { String repoAlias = project.getRepository().getAlias(); String projectName = project.getName(); String space = project.getOrganizationalUnit().getName(); return AND(equalsTo(COLUMN_REPO, repoAlias), equalsTo(COLUMN_PROJECT, projectName), equalsTo(COLUMN_ORG, space)); } @Inject  ProjectMetricsFactory(TranslationService translationService,
                                 DisplayerLocator displayerLocator); Displayer lookupCommitsOverTimeDisplayer(WorkspaceProject project); Displayer lookupCommitsOverTimeDisplayer_small(WorkspaceProject project); Displayer lookupCommitsPerAuthorDisplayer(WorkspaceProject project); Displayer lookupCommitsByYearDisplayer(WorkspaceProject project); Displayer lookupCommitsByQuarterDisplayer(WorkspaceProject project); Displayer lookupCommitsByDayOfWeekDisplayer(WorkspaceProject project); Displayer lookupTopContributorSelectorDisplayer(WorkspaceProject project); Displayer lookupDateSelectorDisplayer(WorkspaceProject project); Displayer lookupAllCommitsDisplayer(WorkspaceProject project); DisplayerSettings buildCommitsPerAuthorSettings(WorkspaceProject project); DisplayerSettings buildCommitsOverTimeSettings(WorkspaceProject project); DisplayerSettings buildCommitsByYearSettings(WorkspaceProject project); DisplayerSettings buildCommitsByQuarterSettings(WorkspaceProject project); DisplayerSettings buildCommitsByDayOfWeekSettings(WorkspaceProject project); DisplayerSettings buildTopContributorSelectorSettings(WorkspaceProject project); DisplayerSettings buildDateSelectorSettings(WorkspaceProject project); DisplayerSettings buildAllCommitsSettings(WorkspaceProject project);  }### Answer:
@Test public void testCreateProjectFilter() { when(workspaceProject.getName()).thenReturn("project1"); when(workspaceProject.getOrganizationalUnit().getName()).thenReturn("mySpace"); when(workspaceProject.getRepository().getAlias()).thenReturn("alias"); LogicalExprFilter filter = (LogicalExprFilter) this.projectMetricsFactory.createProjectFilter(workspaceProject); List<String> filters = filter.getLogicalTerms() .stream() .map(e -> { CoreFunctionFilter f = ((CoreFunctionFilter) e); return f.getColumnId() + "=" + f.getParameters().get(0); }) .collect(Collectors.toList()); assertThat(filters.size(), CoreMatchers.is(3)); assertThat(filters, CoreMatchers.hasItems("project=project1", "organization=mySpace", "repository=alias")); }