@Override
    public int compareTo(Tag tag) {
        int keyResult = this.key.compareTo(tag.key);

        if (keyResult != 0) {
            return keyResult;
        }

        return this.value.compareTo(tag.value);
    }
@Test
    public void compareToTest() {
        Tag tag1 = new Tag(KEY, VALUE);
        Tag tag2 = new Tag(KEY, VALUE);
        Tag tag3 = new Tag(KEY, KEY);
        Tag tag4 = new Tag(VALUE, VALUE);

        Assert.assertTrue(tag1.compareTo(tag2) == 0);
        Assert.assertTrue(tag1.compareTo(tag3) < 0);
        Assert.assertTrue(tag1.compareTo(tag4) > 0);
    }