BloombergEQVanillaOptionChain { public BloombergEQVanillaOptionChain narrowByOptionType(final OptionType optionType) { List<ExternalId> result = new ArrayList<ExternalId>(Collections2.filter(_identifiers, new Predicate<ExternalId>() { public boolean apply(ExternalId identifier) { return new BloombergTickerParserEQVanillaOption(identifier).getOptionType().equals(optionType); } })); return new BloombergEQVanillaOptionChain(result); } BloombergEQVanillaOptionChain(Set<ExternalId> identifiers);  BloombergEQVanillaOptionChain(List<ExternalId> identifiers);  BloombergEQVanillaOptionChain(BloombergEQVanillaOptionChain original); BloombergEQVanillaOptionChain narrowByOptionType(final OptionType optionType); BloombergEQVanillaOptionChain narrowByExpiry(int monthsFromToday); BloombergEQVanillaOptionChain narrowByExpiry(LocalDate referenceDate, final int monthsFromReferenceDate); BloombergEQVanillaOptionChain narrowByStrike(final double referencePrice, int strikeOffset); NavigableSet<ExternalId> getIdentifiers();  }
@Test(dependsOnMethods="preTest") public void testOptionType_1 () { BloombergEQVanillaOptionChain callChain = s_chain.narrowByOptionType(OptionType.CALL); BloombergEQVanillaOptionChain putChain = s_chain.narrowByOptionType(OptionType.PUT); assertCount (512, callChain); assertOptionType (OptionType.CALL, callChain); assertCount (512, putChain); assertOptionType (OptionType.PUT, putChain); }