### Question:
EtdContractSpec implements Attributes, ImmutableBean, Serializable { public EtdOptionSecurity createOption( YearMonth expiryMonth, EtdVariant variant, int version, PutCall putCall, double strikePrice) { return EtdOptionSecurity.of(this, expiryMonth, variant, version, putCall, strikePrice); } EtdContractSpec(
      EtdContractSpecId id,
      EtdType type,
      ExchangeId exchangeId,
      EtdContractCode contractCode,
      String description,
      SecurityPriceInfo priceInfo,
      Map<AttributeType<?>, Object> attributes); static EtdContractSpecBuilder builder(); @Override ImmutableSet<AttributeType<?>> getAttributeTypes(); @Override Optional<T> findAttribute(AttributeType<T> type); @Override EtdContractSpec withAttribute(AttributeType<T> type, T value); @Override EtdContractSpec withAttributes(Attributes other); EtdFutureSecurity createFuture(YearMonth expiryMonth, EtdVariant variant); EtdOptionSecurity createOption(
      YearMonth expiryMonth,
      EtdVariant variant,
      int version,
      PutCall putCall,
      double strikePrice); EtdOptionSecurity createOption(
      YearMonth expiryMonth,
      EtdVariant variant,
      int version,
      PutCall putCall,
      double strikePrice,
      YearMonth underlyingExpiryMonth); static EtdContractSpec.Meta meta(); @Override EtdContractSpec.Meta metaBean(); EtdContractSpecId getId(); EtdType getType(); ExchangeId getExchangeId(); EtdContractCode getContractCode(); String getDescription(); SecurityPriceInfo getPriceInfo(); ImmutableMap<AttributeType<?>, Object> getAttributes(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void createOptionFromFutureContractSpec() { assertThatThrownBy( () -> FUTURE_CONTRACT.createOption(YearMonth.of(2015, 6), EtdVariant.MONTHLY, 0, PutCall.CALL, 123.45)) .isInstanceOf(IllegalStateException.class) .hasMessage("Cannot create an EtdOptionSecurity from a contract specification of type 'Future'"); }
@Test public void createOptionWithUnderlyingFromFutureContractSpec() { assertThatThrownBy( () -> FUTURE_CONTRACT.createOption( YearMonth.of(2015, 6), EtdVariant.MONTHLY, 0, PutCall.CALL, 123.45, YearMonth.of(2015, 9))) .isInstanceOf(IllegalStateException.class) .hasMessage("Cannot create an EtdOptionSecurity from a contract specification of type 'Future'"); }