public void registerSharedStatesAfterRestored(
            SharedStateRegistry sharedStateRegistry, RestoreMode restoreMode) {
        // in claim mode we should not register any shared handles
        if (!props.isUnclaimed()) {
            sharedStateRegistry.registerAllAfterRestored(this, restoreMode);
        }
    }
@Test
    void testRegisterStatesAtRegistry() {
        OperatorState state = mock(OperatorState.class);
        Map<OperatorID, OperatorState> operatorStates = new HashMap<>();
        operatorStates.put(new OperatorID(), state);

        CompletedCheckpoint checkpoint =
                new CompletedCheckpoint(
                        new JobID(),
                        0,
                        0,
                        1,
                        operatorStates,
                        Collections.emptyList(),
                        CheckpointProperties.forCheckpoint(
                                CheckpointRetentionPolicy.RETAIN_ON_FAILURE),
                        new TestCompletedCheckpointStorageLocation(),
                        null);

        SharedStateRegistry sharedStateRegistry = new SharedStateRegistryImpl();
        checkpoint.registerSharedStatesAfterRestored(sharedStateRegistry, RestoreMode.DEFAULT);
        verify(state, times(1)).registerSharedStates(sharedStateRegistry, 0L);
    }