@Override
    public boolean equals(Object obj) {
        if (obj instanceof SqlYearMonthInterval) {
            SqlYearMonthInterval other = ((SqlYearMonthInterval) obj);

            return months == other.months;
        }

        return false;
    }
@Test
    public void testEquals() {
        SqlYearMonthInterval value = new SqlYearMonthInterval(1);

        checkEquals(value, new SqlYearMonthInterval(1), true);
        checkEquals(value, new SqlYearMonthInterval(2), false);
    }