test_class.declarator: pairService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private PairService pairService;
test_class.type: PairService
test_class.var_name: pairService
test_class.declarator: rateService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private RateService rateService;
test_class.type: RateService
test_class.var_name: rateService
test_class.declarator: lookupService
test_class.modifier: @MockBean
  	private
test_class.original_string: @MockBean
  	private LookupService lookupService;
test_class.type: LookupService
test_class.var_name: lookupService
test_class.declarator: rateProviderService
test_class.modifier: @MockBean
  	private
test_class.original_string: @MockBean
  	private RateProviderService rateProviderService;
test_class.type: RateProviderService
test_class.var_name: rateProviderService
test_class.declarator: adminService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private AdminService adminService;
test_class.type: AdminService
test_class.var_name: adminService
test_class.declarator: hRateRepo
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private HistoricalRateRepository hRateRepo;
test_class.type: HistoricalRateRepository
test_class.var_name: hRateRepo
test_class.declarator: hrp
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private HistoricalRateProvider hrp;
test_class.type: HistoricalRateProvider
test_class.var_name: hrp
test_class.declarator: lrp
test_class.modifier: @Mock
  	private
test_class.original_string: @Mock
  	private LatestRateProvider lrp;
test_class.type: LatestRateProvider
test_class.var_name: lrp
test_class.file: trading-common/src/test/java/fr/ymanvieu/trading/common/admin/AdminServiceTest.java
test_class.identifier: AdminServiceTest
test_case.body: @Test
  	public void testSearch() throws Exception {
  		// given
  		String symbolOrNameToSearch = "";
  		String symbol = "UBI.PA";
  		String name = "Ubi";
  		String provider = "Provider";
  				
  		when(lookupService.search(provider)).thenReturn(asList(new LookupInfo(symbol, name, "Paris", "Titres", provider)));
  		when(lookupService.getDetails(symbol, provider)).thenReturn(new LookupDetails(symbol, name, "UBI", "EUR", "EPA", provider));
  
  		// when
  		adminService.search(symbolOrNameToSearch);
  	}
test_case.class_method_signature: AdminServiceTest.testSearch()
test_case.full_signature: @Test public void testSearch()
test_case.identifier: testSearch
test_case.invocations: thenReturn when search asList thenReturn when getDetails search
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSearch()
focal_class.declarator: symbolService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private SymbolService symbolService;
focal_class.type: SymbolService
focal_class.var_name: symbolService
focal_class.declarator: pairService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private PairService pairService;
focal_class.type: PairService
focal_class.var_name: pairService
focal_class.declarator: rateService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private RateService rateService;
focal_class.type: RateService
focal_class.var_name: rateService
focal_class.declarator: rateProviderService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private RateProviderService rateProviderService;
focal_class.type: RateProviderService
focal_class.var_name: rateProviderService
focal_class.declarator: lookupService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private LookupService lookupService;
focal_class.type: LookupService
focal_class.var_name: lookupService
focal_class.file: trading-common/src/main/java/fr/ymanvieu/trading/common/admin/AdminService.java
focal_class.identifier: AdminService
focal_class.class_method_signature: AdminService.add(String code, String provider)
focal_class.full_signature: public SymbolInfo add(String code, String provider)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (String code, String provider)
focal_class.return: SymbolInfo
focal_class.signature: SymbolInfo add(String code, String provider)
focal_class.class_method_signature: AdminService.delete(String code, String provider)
focal_class.full_signature: public void delete(String code, String provider)
focal_class.identifier: delete
focal_class.modifiers: public
focal_class.parameters: (String code, String provider)
focal_class.return: void
focal_class.signature: void delete(String code, String provider)
focal_class.class_method_signature: AdminService.search(String symbolOrName)
focal_class.full_signature: public SearchResult search(String symbolOrName)
focal_class.identifier: search
focal_class.modifiers: public
focal_class.parameters: (String symbolOrName)
focal_class.return: SearchResult
focal_class.signature: SearchResult search(String symbolOrName)
focal_class.class_method_signature: AdminService.removeDuplicates(List<LookupInfo> availableSymbols, List<UpdatedPair> existingSymbols)
focal_class.full_signature: private void removeDuplicates(List<LookupInfo> availableSymbols, List<UpdatedPair> existingSymbols)
focal_class.identifier: removeDuplicates
focal_class.modifiers: private
focal_class.parameters: (List<LookupInfo> availableSymbols, List<UpdatedPair> existingSymbols)
focal_class.return: void
focal_class.signature: void removeDuplicates(List<LookupInfo> availableSymbols, List<UpdatedPair> existingSymbols)
focal_method.body: public SearchResult search(String symbolOrName) throws IOException {
  		final List<UpdatedPair> existingSymbols;
  		final List<LookupInfo> availableSymbols;
  
  		if (Strings.isNullOrEmpty(symbolOrName)) {
  			existingSymbols = pairService.getAll();
  			availableSymbols = new ArrayList<>();
  		} else {
  			existingSymbols = pairService.getAllWithSymbolOrNameContaining(symbolOrName);
  			availableSymbols = lookupService.search(symbolOrName);
  			removeDuplicates(availableSymbols, existingSymbols);
  		}
  		
  		return new SearchResult(existingSymbols, availableSymbols);
  	}
focal_method.class_method_signature: AdminService.search(String symbolOrName)
focal_method.full_signature: public SearchResult search(String symbolOrName)
focal_method.identifier: search
focal_method.invocations: isNullOrEmpty getAll getAllWithSymbolOrNameContaining search removeDuplicates
focal_method.modifiers: public
focal_method.parameters: (String symbolOrName)
focal_method.return: SearchResult
focal_method.signature: SearchResult search(String symbolOrName)