@Override
    public TypeSerializerSchemaCompatibility<T> resolveSchemaCompatibility(
            TypeSerializerSnapshot<T> oldSerializerSnapshot) {
        if (!(oldSerializerSnapshot instanceof KryoSerializerSnapshot)) {
            return TypeSerializerSchemaCompatibility.incompatible();
        }
        KryoSerializerSnapshot<T> oldKryoSerializerSnapshot =
                (KryoSerializerSnapshot<T>) oldSerializerSnapshot;
        if (snapshotData.getTypeClass() != oldKryoSerializerSnapshot.snapshotData.getTypeClass()) {
            return TypeSerializerSchemaCompatibility.incompatible();
        }
        return resolveSchemaCompatibility(oldKryoSerializerSnapshot);
    }
@Test
    void tryingToRestoreWithNonExistingClassShouldBeIncompatible() throws IOException {
        TypeSerializerSnapshot<Animal> restoredSnapshot = kryoSnapshotWithMissingClass();

        TypeSerializer<Animal> currentSerializer =
                new KryoSerializer<>(Animal.class, new SerializerConfigImpl());

        assertThat(
                        currentSerializer
                                .snapshotConfiguration()
                                .resolveSchemaCompatibility(restoredSnapshot))
                .is(isIncompatible());
    }