@Test
public void test_equals() throws Exception {

    TagW t1, t2;
    t1 = new TagW(KEYWORD_1, TagType.STRING);
    assertThat(t1.equals(t1)).isTrue();
    assertThat(t1.equals(null)).isFalse();
    assertThat(t1.equals(KEYWORD_1)).isFalse();
    t1 = new TagW(KEYWORD_1, TagType.STRING);
    t2 = new TagW(KEYWORD_1, TagType.STRING);
    assertThat(t1.equals(t2)).isFalse();
    t1 = new TagW(ID_1, null, TagType.DICOM_PERSON_NAME);
    t2 = new TagW(ID_1, KEYWORD_1, TagType.DICOM_PERSON_NAME);
    assertThat(t1.equals(t2)).isFalse();
    t1 = new TagW(ID_1, KEYWORD_1, TagType.DICOM_PERSON_NAME);
    t2 = new TagW(ID_1, KEYWORD_2, TagType.DICOM_PERSON_NAME);
    assertThat(t1.equals(t2)).isFalse();
    t1 = new TagW(ID_1, KEYWORD_1, TagType.DICOM_PERSON_NAME);
    t2 = new TagW(ID_1, KEYWORD_1, TagType.DICOM_PERSON_NAME);
    assertThat(t1.equals(t2)).isTrue();
    t1 = new TagW(ID_1, null, TagType.DICOM_PERSON_NAME);
    t2 = new TagW(ID_1, null, TagType.DICOM_PERSON_NAME);
    assertThat(t1.equals(t2)).isTrue();
}