OandaHistoricMarketDataProvider implements HistoricMarketDataProvider<String> { String getCountUrl(TradeableInstrument<String> instrument, CandleStickGranularity granularity, int count) { return String .format("%s%s?instrument=%s&candleFormat=midpoint&granularity=%s&dailyAlignment=0&alignmentTimezone=%s&count=%d", this.url, OandaConstants.CANDLES_RESOURCE, instrument.getInstrument(), granularity.name(), tzGMT, count); } OandaHistoricMarketDataProvider(String url, String accessToken); @Override List<CandleStick<String>> getCandleSticks(TradeableInstrument<String> instrument,
			CandleStickGranularity granularity, DateTime from, DateTime to); @Override List<CandleStick<String>> getCandleSticks(TradeableInstrument<String> instrument,
			CandleStickGranularity granularity, int count);  }
@Test public void countUrlTest() { OandaHistoricMarketDataProvider service = new OandaHistoricMarketDataProvider(OandaTestConstants.url, OandaTestConstants.accessToken); String url = service.getCountUrl(new TradeableInstrument<String>("GBP_USD"), CandleStickGranularity.H1, 2); assertEquals( "https: url); }