BloombergDomainIdentifierResolver { public static String toBloombergKey(ExternalId externalId) { ArgumentChecker.notNull(externalId, "externalId"); ExternalScheme scheme = externalId.getScheme(); if (SCHEME_MAP.containsKey(scheme)) { String prefix = SCHEME_MAP.get(scheme); String id = externalId.getValue(); return prefix != null ? prefix + id : id; } s_logger.warn("Unknown ExternalScheme {}", externalId); return externalId.getValue(); } private  BloombergDomainIdentifierResolver(); static String toBloombergKey(ExternalId externalId); static String toBloombergKeyWithDataProvider(ExternalId externalId, String dataProvider); static ExternalId resolvePreferredIdentifier(ExternalIdBundle bundle);  }
@Test(dataProvider = "resolver") public void toBloombergKey(ExternalId externalId, String ignoredDataProvider, String expectedBbgKey) { String bbgKey = BloombergDomainIdentifierResolver.toBloombergKey(externalId); assertNotNull(bbgKey); assertEquals(expectedBbgKey, bbgKey); }