### Question:
AttributeType implements Named, Comparable<AttributeType<T>>, Serializable { @SuppressWarnings("unchecked") @FromString public static <T> AttributeType<T> of(String name) { ArgChecker.notEmpty(name, "name"); return (AttributeType<T>) INSTANCES.computeIfAbsent(name, key -> new AttributeType<T>(key)); } @SuppressWarnings("unchecked") private  AttributeType(String name); @SuppressWarnings("unchecked") private  AttributeType(String name, Class<T> type); @SuppressWarnings("unchecked") @FromString static AttributeType<T> of(String name); static AttributeType<T> registerInstance(String name, Class<T> type, String... aliases); @Override String getName(); @SuppressWarnings("unchecked") AttributeType<R> captureWildcard(); AttributeType<T> normalized(); Object toStoredForm(T value); T fromStoredForm(Object storedValue); @Override final int compareTo(AttributeType<T> other); @Override final boolean equals(Object obj); @Override final int hashCode(); @Override @ToString final String toString(); static final AttributeType<String> DESCRIPTION; static final AttributeType<String> NAME; static final AttributeType<CcpId> CCP; }### Answer:
@Test public void test_equalsHashCode() { AttributeType<String> a = AttributeType.of("test"); AttributeType<String> a2 = AttributeType.of("test"); AttributeType<String> b = AttributeType.of("test2"); assertThat(a) .isEqualTo(a) .isEqualTo(a2) .isNotEqualTo(b) .isNotEqualTo("") .isNotEqualTo(null) .hasSameHashCodeAs(a2) .isLessThan(b); }