### Question:
BondFutureSecurity implements Security, ImmutableBean, Serializable { @Override public BondFuture createProduct(ReferenceData refData) { List<FixedCouponBond> bonds = deliveryBasketIds.stream() .map(id -> resolveBond(id, refData)) .collect(toImmutableList()); return new BondFuture( getSecurityId(), bonds, conversionFactors, lastTradeDate, firstNoticeDate, lastNoticeDate, firstDeliveryDate, lastDeliveryDate, rounding); } private  BondFutureSecurity(
      SecurityInfo info,
      Currency currency,
      List<SecurityId> deliveryBasketIds,
      List<Double> conversionFactors,
      LocalDate lastTradeDate,
      LocalDate firstNoticeDate,
      LocalDate lastNoticeDate,
      LocalDate firstDeliveryDate,
      LocalDate lastDeliveryDate,
      Rounding rounding); @Override ImmutableSet<SecurityId> getUnderlyingIds(); @Override BondFutureSecurity withInfo(SecurityInfo info); @Override BondFuture createProduct(ReferenceData refData); @Override BondFutureTrade createTrade(TradeInfo info, double quantity, double tradePrice, ReferenceData refData); @Override BondFuturePosition createPosition(PositionInfo positionInfo, double quantity, ReferenceData refData); @Override BondFuturePosition createPosition(
      PositionInfo positionInfo,
      double longQuantity,
      double shortQuantity,
      ReferenceData refData); static BondFutureSecurity.Meta meta(); static BondFutureSecurity.Builder builder(); @Override BondFutureSecurity.Meta metaBean(); @Override SecurityInfo getInfo(); @Override Currency getCurrency(); ImmutableList<SecurityId> getDeliveryBasketIds(); ImmutableList<Double> getConversionFactors(); LocalDate getLastTradeDate(); LocalDate getFirstNoticeDate(); LocalDate getLastNoticeDate(); Optional<LocalDate> getFirstDeliveryDate(); Optional<LocalDate> getLastDeliveryDate(); Rounding getRounding(); Builder toBuilder(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_createProduct_wrongType() { BondFutureSecurity test = sut(); ImmutableList<FixedCouponBond> basket = PRODUCT.getDeliveryBasket(); SecurityId secId = basket.get(0).getSecurityId(); GenericSecurity sec = GenericSecurity.of(INFO); ReferenceData refData = ImmutableReferenceData.of(secId, sec); assertThatExceptionOfType(ClassCastException.class) .isThrownBy(() -> test.createProduct(refData)); }