@Test public void getNullQuote() throws Exception { Quote quote = service.getQuote(TestConfiguration.NULL_QUOTE_SYMBOL); assertEquals(quote.getStatus(), "FAILED"); }
@HystrixCommand(fallbackMethod = "getQuoteFallback") public Quote getQuote(String symbol) throws SymbolNotFoundException { log.debug("QuoteService.getQuote: retrieving quote for: " + symbol); Map<String, String> params = new HashMap<String, String>(); params.put("symbol", symbol); IexQuote quote = restTemplate.getForObject(quote_url, IexQuote.class, params); if (quote.getSymbol() == null) { throw new SymbolNotFoundException("Symbol not found: " + symbol); } log.debug("QuoteService.getQuote: retrieved quote: " + quote); return QuoteMapper.INSTANCE.mapFromIexQuote(quote); }
QuoteService { @HystrixCommand(fallbackMethod = "getQuoteFallback") public Quote getQuote(String symbol) throws SymbolNotFoundException { log.debug("QuoteService.getQuote: retrieving quote for: " + symbol); Map<String, String> params = new HashMap<String, String>(); params.put("symbol", symbol); IexQuote quote = restTemplate.getForObject(quote_url, IexQuote.class, params); if (quote.getSymbol() == null) { throw new SymbolNotFoundException("Symbol not found: " + symbol); } log.debug("QuoteService.getQuote: retrieved quote: " + quote); return QuoteMapper.INSTANCE.mapFromIexQuote(quote); } }
QuoteService { @HystrixCommand(fallbackMethod = "getQuoteFallback") public Quote getQuote(String symbol) throws SymbolNotFoundException { log.debug("QuoteService.getQuote: retrieving quote for: " + symbol); Map<String, String> params = new HashMap<String, String>(); params.put("symbol", symbol); IexQuote quote = restTemplate.getForObject(quote_url, IexQuote.class, params); if (quote.getSymbol() == null) { throw new SymbolNotFoundException("Symbol not found: " + symbol); } log.debug("QuoteService.getQuote: retrieved quote: " + quote); return QuoteMapper.INSTANCE.mapFromIexQuote(quote); }  }
QuoteService { @HystrixCommand(fallbackMethod = "getQuoteFallback") public Quote getQuote(String symbol) throws SymbolNotFoundException { log.debug("QuoteService.getQuote: retrieving quote for: " + symbol); Map<String, String> params = new HashMap<String, String>(); params.put("symbol", symbol); IexQuote quote = restTemplate.getForObject(quote_url, IexQuote.class, params); if (quote.getSymbol() == null) { throw new SymbolNotFoundException("Symbol not found: " + symbol); } log.debug("QuoteService.getQuote: retrieved quote: " + quote); return QuoteMapper.INSTANCE.mapFromIexQuote(quote); }  @HystrixCommand(fallbackMethod = "getQuoteFallback") Quote getQuote(String symbol); @HystrixCommand(fallbackMethod = "getCompanyInfoFallback", commandProperties = { @HystrixProperty(name="execution.timeout.enabled", value="false") }) List<CompanyInfo> getCompanyInfo(String name); List<Quote> getQuotes(String symbols); }
QuoteService { @HystrixCommand(fallbackMethod = "getQuoteFallback") public Quote getQuote(String symbol) throws SymbolNotFoundException { log.debug("QuoteService.getQuote: retrieving quote for: " + symbol); Map<String, String> params = new HashMap<String, String>(); params.put("symbol", symbol); IexQuote quote = restTemplate.getForObject(quote_url, IexQuote.class, params); if (quote.getSymbol() == null) { throw new SymbolNotFoundException("Symbol not found: " + symbol); } log.debug("QuoteService.getQuote: retrieved quote: " + quote); return QuoteMapper.INSTANCE.mapFromIexQuote(quote); }  @HystrixCommand(fallbackMethod = "getQuoteFallback") Quote getQuote(String symbol); @HystrixCommand(fallbackMethod = "getCompanyInfoFallback", commandProperties = { @HystrixProperty(name="execution.timeout.enabled", value="false") }) List<CompanyInfo> getCompanyInfo(String name); List<Quote> getQuotes(String symbols); static final String FMT; }