@Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        IndexSpec indexSpec = (IndexSpec) o;
        return Objects.equal(name, indexSpec.name);
    }
@Test
    void equalAnotherObject() {
        var spec3 = new IndexSpec()
            .setName("metadata.name");
        assertThat(spec3.equals(new Object())).isFalse();
    }