### Question:
ProjectHandler implements ProjectService.Iface { @Override public List<Project> searchByName(String name, User user) throws TException { assertNotEmpty(name); assertUser(user); return handler.searchByName(name, user); } ProjectHandler(); @Override List<Project> search(String text); @Override List<Project> refineSearch(String text, Map<String, Set<String>> subQueryRestrictions, User user); @Override List<Project> getMyProjects(User user, Map<String, Boolean> userRoles); @Override List<Project> getAccessibleProjectsSummary(User user); @Override Set<Project> getAccessibleProjects(User user); @Override List<Project> searchByName(String name, User user); @Override Set<Project> searchByReleaseId(String id, User user); @Override Set<Project> searchByReleaseIds(Set<String> ids, User user); @Override Set<Project> searchLinkingProjects(String id, User user); @Override AddDocumentRequestSummary createClearingRequest(ClearingRequest clearingRequest, User user, String projectUrl); @Override Project getProjectById(String id, User user); @Override List<Project> getProjectsById(List<String> id, User user); @Override Project getProjectByIdForEdit(String id, User user); @Override int getCountByReleaseIds(Set<String> ids); @Override int getCountByProjectId(String id); @Override Set<Project> searchByExternalIds(Map<String, Set<String>> externalIds, User user); @Override RequestSummary importBomFromAttachmentContent(User user, String attachmentContentId); @Override AddDocumentRequestSummary addProject(Project project, User user); @Override RequestStatus updateProject(Project project, User user); RequestStatus updateProjectFromModerationRequest(Project projectAdditions, Project projectDeletions, User user); @Override RequestStatus deleteProject(String id, User user); @Override List<ProjectLink> getLinkedProjectsOfProject(Project project, boolean deep, User user); @Override List<ProjectLink> getLinkedProjectsById(String id, boolean deep, User user); @Override List<ProjectLink> getLinkedProjects(Map<String, ProjectRelationship> relations, User user); @Override Map<String, List<String>> getDuplicateProjects(); @Override List<Project> fillClearingStateSummary(List<Project> projects, User user); @Override List<Project> fillClearingStateSummaryIncludingSubprojects(List<Project> projects, User user); @Override List<ReleaseClearingStatusData> getReleaseClearingStatuses(String projectId, User user); @Override RequestStatus removeAttachmentFromProject(String projectId, User user, String attachmentContentId); @Override boolean projectIsUsed(String projectId); @Override String getCyclicLinkedProjectPath(Project project, User user); @Override ObligationList getLinkedObligations(String obligationId, User user); @Override RequestStatus addLinkedObligations(ObligationList obligation, User user); @Override RequestStatus updateLinkedObligations(ObligationList obligation, User user); void deleteReleaseRelationsUsage(UsedReleaseRelations usedReleaseRelations); @Override void addReleaseRelationsUsage(UsedReleaseRelations usedReleaseRelations); @Override void updateReleaseRelationsUsage(UsedReleaseRelations usedReleaseRelations); @Override List<UsedReleaseRelations> getUsedReleaseRelationsByProjectId(String projectId); @Override List<Map<String, String>> getClearingStateInformationForListView(String projectId,User user);  }### Answer:
@Test public void testSearchByName() throws Exception { List<Project> projects = handler.searchByName("Project1", user1); assertThat(getProjectIds(projects), containsInAnyOrder("P1")); }