@Override
    public void register(@NonNull Scheme scheme) {
        if (!schemes.contains(scheme)) {
            indexSpecRegistry.indexFor(scheme);
            schemes.add(scheme);
            getWatchers().forEach(watcher -> watcher.onChange(new SchemeRegistered(scheme)));
        }
    }
@Test
    void shouldTriggerOnChangeOnlyOnceWhenRegisterTwice() {
        final var watcher = mock(SchemeWatcher.class);
        when(watcherManager.watchers()).thenReturn(List.of(watcher));

        schemeManager.register(FakeExtension.class);
        verify(watcherManager, times(1)).watchers();
        verify(watcher, times(1)).onChange(isA(SchemeRegistered.class));

        schemeManager.register(FakeExtension.class);
        verify(watcherManager, times(1)).watchers();
        verify(watcher, times(1)).onChange(isA(SchemeRegistered.class));
        verify(indexSpecRegistry).indexFor(any(Scheme.class));
    }