@Override
    public synchronized void unexport() {
        if (!exported) {
            return;
        }
        if (unexported) {
            return;
        }
        if (!exporters.isEmpty()) {
            for (List<Exporter<?>> es : exporters.values()) {
                for (Exporter<?> exporter : es) {
                    try {
                        exporter.unregister();
                    } catch (Throwable t) {
                        logger.warn(
                                CONFIG_UNEXPORT_ERROR,
                                "",
                                "",
                                "Unexpected error occurred when unexport " + exporter,
                                t);
                    }
                }
            }
            waitForIdle();
            for (List<Exporter<?>> es : exporters.values()) {
                for (Exporter<?> exporter : es) {
                    try {
                        exporter.unexport();
                    } catch (Throwable t) {
                        logger.warn(
                                CONFIG_UNEXPORT_ERROR,
                                "",
                                "",
                                "Unexpected error occurred when unexport " + exporter,
                                t);
                    }
                }
            }
            exporters.clear();
        }
        unexported = true;
        onUnexpoted();
        ModuleServiceRepository repository = getScopeModel().getServiceRepository();
        repository.unregisterProvider(providerModel);
    }
@Test
    void testUnexport() throws Exception {
        System.setProperty(SHUTDOWN_WAIT_KEY, "0");
        try {
            service.export();
            service.unexport();
            //            Thread.sleep(1000);
            Mockito.verify(exporter, Mockito.atLeastOnce()).unexport();
        } finally {
            System.clearProperty(SHUTDOWN_TIMEOUT_KEY);
        }
    }