BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider extends BloombergFutureOptionVolatilitySurfaceInstrumentProvider { @Override public ExternalId getInstrument(final Number futureOptionNumber, final Double strike, final LocalDate surfaceDate) { ArgumentChecker.notNull(futureOptionNumber, "futureOptionNumber"); ArgumentChecker.notNull(strike, "strike"); ArgumentChecker.notNull(surfaceDate, "surface date"); final String prefix = getFutureOptionPrefix(); final StringBuffer ticker = new StringBuffer(); ticker.append(prefix); ticker.append(" "); final ExchangeTradedInstrumentExpiryCalculator expiryRule = getExpiryRuleCalculator(); final LocalDate expiry = expiryRule.getExpiryDate(futureOptionNumber.intValue(), surfaceDate, NO_HOLIDAYS); ticker.append(FORMAT.format(expiry)); ticker.append(" "); ticker.append(strike > useCallAboveStrike() ? "C" : "P"); ticker.append(strike); ticker.append(" "); ticker.append(getPostfix()); return ExternalId.of(getScheme(), ticker.toString()); } BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider(final String futureOptionPrefix, final String postfix, final String dataFieldName, final Double useCallAboveStrike,
      final String exchangeIdName);  BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider(final String futureOptionPrefix, final String postfix, final String dataFieldName, final Double useCallAboveStrike,
      final String exchangeIdName, final String schemeName); @Override ExternalId getInstrument(final Number futureOptionNumber, final Double strike, final LocalDate surfaceDate); static HashMap<String, ExchangeTradedInstrumentExpiryCalculator> getExpiryRules(); @Override ExchangeTradedInstrumentExpiryCalculator getExpiryRuleCalculator();  }
@Test public void testTickers() { final BloombergEquityIndexFutureOptionVolatilitySurfaceInstrumentProvider provider = new BloombergEquityIndexFutureOptionVolatilitySurfaceInstrumentProvider(PREFIX, POSTFIX, DATA_FIELD_NAME, SPOT, EXCHANGE, SCHEME); int i = 0; for (final Pair<Integer, Tenor> p : N_OPTION) { for (final double strike : STRIKES) { assertEquals(ExternalId.of(SCHEME, RESULTS[i++]), provider.getInstrument(p, strike, DATE)); } } }