@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        } else if (!(obj instanceof Tag)) {
            return false;
        }
        Tag other = (Tag) obj;
        if (this.key == null) {
            if (other.key != null) {
                return false;
            }
        } else if (!this.key.equals(other.key)) {
            return false;
        } else if (this.value == null) {
            if (other.value != null) {
                return false;
            }
        } else if (!this.value.equals(other.value)) {
            return false;
        }
        return true;
    }
@Test
    public void equalsTest() {
        Tag tag1 = new Tag(KEY, VALUE);
        Tag tag2 = new Tag(KEY, VALUE);
        Tag tag3 = new Tag(KEY, KEY);
        Tag tag4 = new Tag(VALUE, VALUE);

        TestUtils.equalsTest(tag1, tag2);

        TestUtils.notEqualsTest(tag1, tag3);
        TestUtils.notEqualsTest(tag1, tag4);
        TestUtils.notEqualsTest(tag1, new Object());
        TestUtils.notEqualsTest(tag1, null);
    }