@Test public void testGetSavedQueryTemplates_Case1() { unitUnderTest.getSavedQueryTemplates(asyncQtListMock); ArgumentCaptor<ServiceCallWrapper> wrapperCaptor = ArgumentCaptor.forClass(ServiceCallWrapper.class); verify(deServiceFacadeMock).getServiceData(wrapperCaptor.capture(), asyncStringCaptor.capture()); final String expectedAddress = "saved-searches"; assertEquals("Verify that it is a GET", Type.GET, wrapperCaptor.getValue().getType()); }
@Override public void getSavedQueryTemplates(AsyncCallback<List<DiskResourceQueryTemplate>> callback) { String address = deProperties.getMuleServiceBaseUrl() + "saved-searches"; ServiceCallWrapper wrapper = new ServiceCallWrapper(GET, address); deServiceFacade.getServiceData(wrapper, new QueryTemplateListCallbackConverter(callback, searchAbFactory)); }
SearchServiceFacadeImpl implements SearchServiceFacade { @Override public void getSavedQueryTemplates(AsyncCallback<List<DiskResourceQueryTemplate>> callback) { String address = deProperties.getMuleServiceBaseUrl() + "saved-searches"; ServiceCallWrapper wrapper = new ServiceCallWrapper(GET, address); deServiceFacade.getServiceData(wrapper, new QueryTemplateListCallbackConverter(callback, searchAbFactory)); } }
SearchServiceFacadeImpl implements SearchServiceFacade { @Override public void getSavedQueryTemplates(AsyncCallback<List<DiskResourceQueryTemplate>> callback) { String address = deProperties.getMuleServiceBaseUrl() + "saved-searches"; ServiceCallWrapper wrapper = new ServiceCallWrapper(GET, address); deServiceFacade.getServiceData(wrapper, new QueryTemplateListCallbackConverter(callback, searchAbFactory)); } @Inject  SearchServiceFacadeImpl(final DiscEnvApiService deServiceFacade,
                                   final DEProperties deProperties,
                                   final SearchAutoBeanFactory searchAbFactory,
                                   final DiskResourceAutoBeanFactory drFactory,
                                   final UserInfo userInfo); }
SearchServiceFacadeImpl implements SearchServiceFacade { @Override public void getSavedQueryTemplates(AsyncCallback<List<DiskResourceQueryTemplate>> callback) { String address = deProperties.getMuleServiceBaseUrl() + "saved-searches"; ServiceCallWrapper wrapper = new ServiceCallWrapper(GET, address); deServiceFacade.getServiceData(wrapper, new QueryTemplateListCallbackConverter(callback, searchAbFactory)); } @Inject  SearchServiceFacadeImpl(final DiscEnvApiService deServiceFacade,
                                   final DEProperties deProperties,
                                   final SearchAutoBeanFactory searchAbFactory,
                                   final DiskResourceAutoBeanFactory drFactory,
                                   final UserInfo userInfo); @Override List<DiskResourceQueryTemplate> createFrozenList(List<DiskResourceQueryTemplate> queryTemplates); @Override void getSavedQueryTemplates(AsyncCallback<List<DiskResourceQueryTemplate>> callback); @Override void saveQueryTemplates(List<DiskResourceQueryTemplate> queryTemplates, AsyncCallback<List<DiskResourceQueryTemplate>> callback); @Override void deleteQueryTemplates(List<DiskResourceQueryTemplate> queryTemplates,
                                     AsyncCallback<List<DiskResourceQueryTemplate>> callback); @Override void submitSearchFromQueryTemplate(DiskResourceQueryTemplate queryTemplate, FilterPagingLoadConfigBean loadConfig, TYPE searchType, AsyncCallback<List<DiskResource>> callback); }
SearchServiceFacadeImpl implements SearchServiceFacade { @Override public void getSavedQueryTemplates(AsyncCallback<List<DiskResourceQueryTemplate>> callback) { String address = deProperties.getMuleServiceBaseUrl() + "saved-searches"; ServiceCallWrapper wrapper = new ServiceCallWrapper(GET, address); deServiceFacade.getServiceData(wrapper, new QueryTemplateListCallbackConverter(callback, searchAbFactory)); } @Inject  SearchServiceFacadeImpl(final DiscEnvApiService deServiceFacade,
                                   final DEProperties deProperties,
                                   final SearchAutoBeanFactory searchAbFactory,
                                   final DiskResourceAutoBeanFactory drFactory,
                                   final UserInfo userInfo); @Override List<DiskResourceQueryTemplate> createFrozenList(List<DiskResourceQueryTemplate> queryTemplates); @Override void getSavedQueryTemplates(AsyncCallback<List<DiskResourceQueryTemplate>> callback); @Override void saveQueryTemplates(List<DiskResourceQueryTemplate> queryTemplates, AsyncCallback<List<DiskResourceQueryTemplate>> callback); @Override void deleteQueryTemplates(List<DiskResourceQueryTemplate> queryTemplates,
                                     AsyncCallback<List<DiskResourceQueryTemplate>> callback); @Override void submitSearchFromQueryTemplate(DiskResourceQueryTemplate queryTemplate, FilterPagingLoadConfigBean loadConfig, TYPE searchType, AsyncCallback<List<DiskResource>> callback);  }