assertSame(identifiers2, identifiers1);
}
public void testDifferentSecurities() {
final Impl impl = new Impl();
final EquityOptionSecurity security1 = new EquityOptionSecurity(OptionType.CALL, 1.0, Currency.USD, ExternalId.of("S", "V1"), new AmericanExerciseType(), new Expiry(ZonedDateTime.now()), 1.0,
"EXCH");
final EquityOptionSecurity security2 = new EquityOptionSecurity(OptionType.CALL, 1.0, Currency.USD, ExternalId.of("S", "V2"), new AmericanExerciseType(), new Expiry(ZonedDateTime.now()), 1.0,
"EXCH");
final ExternalIdBundle identifiers1 = impl.storeSecurity(security1);
assertSame(impl._security, security1);
assertEquals(security1.getExternalIdBundle(), identifiers1);
impl._security = null;
final ExternalIdBundle identifiers2 = impl.storeSecurity(security2);
assertSame(impl._security, security2);
assertEquals(security2.getExternalIdBundle(), identifiers2);
assertFalse(identifiers1.equals(identifiers2));
}