### Question:
EtdContractGroupId implements Serializable { public static EtdContractGroupId of(String exchangeId, String contractGroupCode) { return of(ExchangeId.of(exchangeId), EtdContractGroupCode.of(contractGroupCode)); } private  EtdContractGroupId(ExchangeId exchangeId, EtdContractGroupCode contractGroupCode); static EtdContractGroupId of(String exchangeId, String contractGroupCode); static EtdContractGroupId of(ExchangeId exchangeId, EtdContractGroupCode contractGroupCode); @FromString static EtdContractGroupId parse(String str); ExchangeId getExchangeId(); EtdContractGroupCode getCode(); @Override boolean equals(Object obj); @Override int hashCode(); @ToString @Override String toString();  }### Answer:
@Test public void test_equalsHashCode() { EtdContractGroupId a = EtdContractGroupId.of(ExchangeIds.ECAG, EtdContractGroupCode.of("ABC")); EtdContractGroupId a2 = EtdContractGroupId.of(ExchangeIds.ECAG, EtdContractGroupCode.of("ABC")); EtdContractGroupId b = EtdContractGroupId.of(ExchangeIds.IFEN, EtdContractGroupCode.of("ABC")); EtdContractGroupId c = EtdContractGroupId.of(ExchangeIds.ECAG, EtdContractGroupCode.of("DEF")); assertThat(a) .isEqualTo(a2) .isNotEqualTo(b) .isNotEqualTo(c) .isNotEqualTo("") .isNotEqualTo(null) .hasSameHashCodeAs(a2); }
@Test public void test_serialization() { EtdContractGroupId test = EtdContractGroupId.of("A", "B"); assertSerialization(test); }