@Test public void test_should_return_status_given_keyword() throws Exception{ List<ComplaintStatus> statusMappings = getKeywordStatusList(); when(keywordStatusMappingService.getStatusForKeyword(new KeywordStatusMappingSearchCriteria("Complaint","default"))) .thenReturn(statusMappings); List<ComplaintStatus> expectedKeywordMappings = keywordStatusMappingService .getStatusForKeyword(new KeywordStatusMappingSearchCriteria("Complaint","default")); assertThat(expectedKeywordMappings).isEqualTo(statusMappings); }
public List<ComplaintStatus> getStatusForKeyword(KeywordStatusMappingSearchCriteria searchCriteria){ return keywordStatusMappingRepository.getAllStatusForKeyword(searchCriteria.getKeyword(), searchCriteria.getTenantId()); }
KeywordStatusMappingService { public List<ComplaintStatus> getStatusForKeyword(KeywordStatusMappingSearchCriteria searchCriteria){ return keywordStatusMappingRepository.getAllStatusForKeyword(searchCriteria.getKeyword(), searchCriteria.getTenantId()); } }
KeywordStatusMappingService { public List<ComplaintStatus> getStatusForKeyword(KeywordStatusMappingSearchCriteria searchCriteria){ return keywordStatusMappingRepository.getAllStatusForKeyword(searchCriteria.getKeyword(), searchCriteria.getTenantId()); } KeywordStatusMappingService(KeywordStatusMappingRepository keywordStatusMappingRepository); }
KeywordStatusMappingService { public List<ComplaintStatus> getStatusForKeyword(KeywordStatusMappingSearchCriteria searchCriteria){ return keywordStatusMappingRepository.getAllStatusForKeyword(searchCriteria.getKeyword(), searchCriteria.getTenantId()); } KeywordStatusMappingService(KeywordStatusMappingRepository keywordStatusMappingRepository); List<ComplaintStatus> getStatusForKeyword(KeywordStatusMappingSearchCriteria searchCriteria); }
KeywordStatusMappingService { public List<ComplaintStatus> getStatusForKeyword(KeywordStatusMappingSearchCriteria searchCriteria){ return keywordStatusMappingRepository.getAllStatusForKeyword(searchCriteria.getKeyword(), searchCriteria.getTenantId()); } KeywordStatusMappingService(KeywordStatusMappingRepository keywordStatusMappingRepository); List<ComplaintStatus> getStatusForKeyword(KeywordStatusMappingSearchCriteria searchCriteria);  }