Atributo { @Override public final int hashCode() { return nome.hashCode(); } Atributo(final String nomeAtributo,
                    final String descricaoAtributo, final int tipoAtributo); final String getNome(); final int getTipo(); @Override final boolean equals(final Object other); @Override final int hashCode(); final String getDescricao(); static final int LOGICO; static final int REAL; static final int STRING; static final int DATA; }
@Test public void atributosIguaisHashCodeIguais() { Atributo a = new Atributo("a", "d", Atributo.REAL); Atributo b = new Atributo("a", "d", Atributo.REAL); assertEquals(a, a); assertEquals(a, b); assertEquals(a.hashCode(), b.hashCode()); }