@Override
    public boolean equals(Object obj) {
        if (obj instanceof IndexFile) {
            if (equalsByExists((IndexFile) obj)) {
                if (this.exists()) {
                    return equalsByIsSameFile((IndexFile) obj);
                } else {
                    return Objects.equals(this.getAbsoluteFile().getAbsolutePath(), ((IndexFile)obj).getAbsoluteFile().getAbsolutePath());
                }
            }
            return false;
        }
        return false;
    }
@Test
    void isEqualNotExisting() {
        String expected = "model";
        IndexFile indexFile = new IndexFile("not/exist/", expected);
        IndexFile compareFile = new IndexFile("not/exist/", expected);
        assertThat(compareFile.getName()).isEqualTo(indexFile.getName());
        assertThat(compareFile.getPath()).isEqualTo(indexFile.getPath());
        assertThat(compareFile.getAbsolutePath()).isEqualTo(indexFile.getAbsolutePath());
        assertThat(compareFile.equals(indexFile)).isTrue();
    }