return new ByteArrayInputStream("\"ADS.DE\",49.20,\"9/1/2011\",N/A,N/A,48.66,N/A" //
.getBytes(Charset.forName("UTF-8")));
}
};
Security daimler = new Security("Daimler AG", "DE0007100000", "DAI.DE", YahooFinanceQuoteFeed.ID);
Security adidas = new Security("Adidas", "DE000A1EWWW0", "ADS.DE", YahooFinanceQuoteFeed.ID);
ArrayList<Security> securities = new ArrayList<Security>();
securities.add(daimler);
securities.add(adidas);
List<Exception> errors = new ArrayList<Exception>();
feed.updateLatestQuotes(securities, errors);
// not first, but second security must have value
LatestSecurityPrice latest = adidas.getLatest();
assertThat(latest.getValue(), is(4920L));
assertThat(errors.size(), is(1));
assertThat(errors.get(0).getMessage(), containsString(daimler.getTickerSymbol()));