### Question:
ExchangeId implements Named, Serializable { @FromString public static ExchangeId of(String name) { return new ExchangeId(name); } private  ExchangeId(String name); @FromString static ExchangeId of(String name); @Override String getName(); @Override boolean equals(Object obj); @Override int hashCode(); @ToString @Override String toString();  }### Answer:
@Test public void test_equalsHashCode() { ExchangeId a = ExchangeId.of("ECAG"); ExchangeId a2 = ExchangeIds.ECAG; ExchangeId b = ExchangeId.of("XLON"); assertThat(a) .isEqualTo(a) .isEqualTo(a2) .isNotEqualTo(b) .isNotEqualTo("") .isNotEqualTo(null) .hasSameHashCodeAs(a2); }
@Test public void test_serialization() { ExchangeId test = ExchangeId.of("ECAG"); assertSerialization(test); }