@Override
    public int hashCode() {
        return Arrays.hashCode(components);
    }
@Test
    public void testEqualsAndHashCode() {
        CompositeValue a = value("a", 'a');
        assertThat(a).isNotNull();
        assertThat(a).isEqualTo(a);

        assertThat(value("a", 'a')).isEqualTo(value("a", 'a'));
        assertThat(value("a", 'a').hashCode()).isEqualTo(value("a", 'a').hashCode());

        assertThat(value("a", 'a')).isNotEqualTo(value('a', "a"));
        assertThat(value("a", 'a')).isNotEqualTo(value("b", 'b'));
        assertThat(value("a", 'a')).isNotEqualTo(value('b', "b"));
        assertThat(value("a", 'a')).isNotEqualTo(value(null, 'a'));
        assertThat(value("a", 'a')).isNotEqualTo(value("a", NULL));
        assertThat(value("a", 'a')).isNotEqualTo(value("a", NEGATIVE_INFINITY));
        assertThat(value("a", 'a')).isNotEqualTo(value("a", POSITIVE_INFINITY));
    }