### Question:
TransactionalTopicFetchService extends AbstractTransactionalEntityService<Topic, TopicDao> implements TopicFetchService, PluginTopicFetchService { @Override public Page<Topic> searchByTitleAndContent(String phrase, String page) { JCUser currentUser = userService.getCurrentUser(); List<Long> allowedBranchesIds = this.getDao().getAllowedBranchesIds(currentUser); if (!StringUtils.isEmpty(phrase) && !allowedBranchesIds.isEmpty()) { int pageSize = currentUser.getPageSize(); PageRequest pageRequest = new PageRequest(page, pageSize); String normalizedPhrase = StringUtils.left(phrase, 50); return searchDao.searchByTitleAndContent(normalizedPhrase, pageRequest, allowedBranchesIds); } return new PageImpl<>(Collections.<Topic>emptyList()); } TransactionalTopicFetchService(TopicDao dao, ComponentService componentService, UserService userService, TopicSearchDao searchDao); @Override Topic get(Long id); @Override Page<Topic> getRecentTopics(String page); @Override Page<Topic> getUnansweredTopics(String page); @Override Topic getTopicSilently(Long id); @Override Page<Topic> getTopics(Branch branch, String page); @Override Page<Topic> searchByTitleAndContent(String phrase, String page); @Override void rebuildSearchIndex(); @PreAuthorize("hasPermission(#branchId, 'BRANCH', 'BranchPermission.VIEW_TOPICS')") @Override void checkViewTopicPermission(Long branchId);  }### Answer:
@Test(dataProvider = "parameterSearchPostsWithEmptySearchPhrase") public void testSearchPostsWithEmptySearchPhrase(String phrase) { Page<Topic> searchResultPage = topicFetchService.searchByTitleAndContent(phrase, "50"); Assert.assertTrue(!searchResultPage.hasContent(), "The search result must be empty."); }