### Question:
EtdContractGroupCode extends TypedString<EtdContractGroupCode> { @FromString public static EtdContractGroupCode of(String name) { return new EtdContractGroupCode(name); } private  EtdContractGroupCode(String name); @FromString static EtdContractGroupCode of(String name);  }### Answer:
@Test public void test_of() { EtdContractGroupCode test = EtdContractGroupCode.of("ABC"); assertThat(test.getName()).isEqualTo("ABC"); assertThat(test).hasToString("ABC"); assertThatIllegalArgumentException().isThrownBy(() -> EtdContractGroupCode.of("")); assertThatIllegalArgumentException().isThrownBy(() -> EtdContractGroupCode.of("\n")); }
@Test public void test_equalsHashCode() { EtdContractGroupCode a = EtdContractGroupCode.of("ABC"); EtdContractGroupCode a2 = EtdContractGroupCode.of("ABC"); EtdContractGroupCode b = EtdContractGroupCode.of("DEF"); assertThat(a) .isEqualTo(a2) .isNotEqualTo(b) .isNotEqualTo("") .isNotEqualTo(null) .hasSameHashCodeAs(a2); }
@Test public void test_serialization() { EtdContractGroupCode test = EtdContractGroupCode.of("ABC"); assertSerialization(test); }