### Question:
Artist { @Override public boolean equals(final Object other) { if (!(other instanceof Artist)) return false; Artist castOther = (Artist) other; return new EqualsBuilder().append(getIdentityName(), castOther.getIdentityName()).isEquals(); } protected  Artist();  Artist(String name); Set<Album> getAlbums(); String getName(); String getUuid(); String addSong(AlbumAndSongInfo albumAndSongInfo); @Override int hashCode(); @Override boolean equals(final Object other); String getIdentityName(); @Override String toString();  }### Answer:
@Test public void testEquals() { Artist artist1 = new Artist("Dio"); Artist artist2 = new Artist("Dio"); assertEquals(artist1, artist2); }
@Test public void testNotEquals() { Artist artist1 = new Artist("Dio"); Artist artist2 = new Artist("Black Sabbath"); assertFalse(artist1.equals(artist2)); }