@Override
    public int compareTo(final Key key) {
        return keyDefinition.compareTo(key.keyDefinition);
    }
@Test
    void testEqual() throws Exception {
        final Key a = new Key(KeyDefinition.newKeyDefinition().withId("id").build(), 2);
        final Key b = new Key(KeyDefinition.newKeyDefinition().withId("id").build(), 2);
        
        assertThat(a.compareTo(b)).isEqualTo(0);
    }