@Override
    public void deconstruct(long generation, List<Object> components, Collection<Bundle> bundles) {
        Collection<Deconstructable> destructibleComponents = new ArrayList<>();
        for (var component : components) {
            if (component instanceof AbstractComponent) {
                AbstractComponent abstractComponent = (AbstractComponent) component;
                if (abstractComponent.isDeconstructable()) {
                    destructibleComponents.add(abstractComponent);
                }
            } else if (component instanceof Provider) {
                destructibleComponents.add((Deconstructable) component);
            } else if (component instanceof SharedResource) {
                // Release shared resources in same order as other components in case of usage without reference counting
                destructibleComponents.add(new SharedResourceReleaser(component));
            }
        }
        if (!destructibleComponents.isEmpty() || !bundles.isEmpty()) {
            executor.execute(new DestructComponentTask(generation, destructibleComponents, bundles));
        }
    }
@Test
    void require_provider_destructed() throws InterruptedException {
        TestProvider provider = new TestProvider();
        deconstructor.deconstruct(0, List.of(provider), List.of());

        waitForDeconstructToComplete(() -> provider.destructed);
        assertTrue(provider.destructed);
    }