QuoteRemoteCallService { @HystrixCommand(fallbackMethod = "getQuoteFallback") public Quote getQuote(String symbol) { logger.debug("Fetching quote: " + symbol); Quote quote = restTemplate.getForObject(downstreamProtocol + ": return quote; }  @HystrixCommand(fallbackMethod = "getQuoteFallback") Quote getQuote(String symbol); List<Quote> getMultipleQuotes(String symbols); List<Quote> getMultipleQuotes(Collection<String> symbols);  }
@Test @Ignore public void doGetQuote() { when(restTemplate.getForObject("http: Quote quote = service.getQuote(ServiceTestConfiguration.SYMBOL); assertEquals(ServiceTestConfiguration.quote(),quote); }
@Test public void doGetQuoteFailure() { when(restTemplate.getForObject("http: Quote quote = service.getQuote(ServiceTestConfiguration.SYMBOL); assertNotEquals(ServiceTestConfiguration.quote(),quote); Quote emptyQuote = new Quote(); emptyQuote.setSymbol(ServiceTestConfiguration.SYMBOL); emptyQuote.setStatus("FAILED"); assertEquals(emptyQuote,quote); }