public static void destroyAll() {
        synchronized (globalLock) {
            for (FrameworkModel frameworkModel : new ArrayList<>(allInstances)) {
                frameworkModel.destroy();
            }
        }
    }
@Test
    void destroyAll() {
        FrameworkModel frameworkModel = new FrameworkModel();
        frameworkModel.defaultApplication();
        frameworkModel.newApplication();

        FrameworkModel.destroyAll();
        Assertions.assertTrue(FrameworkModel.getAllInstances().isEmpty());
        Assertions.assertTrue(frameworkModel.isDestroyed());

        try {
            frameworkModel.defaultApplication();
            Assertions.fail("Cannot create new application after framework model destroyed");
        } catch (Exception e) {
            Assertions.assertEquals("FrameworkModel is destroyed", e.getMessage(), StringUtils.toString(e));
        }

        try {
            frameworkModel.newApplication();
            Assertions.fail("Cannot create new application after framework model destroyed");
        } catch (Exception e) {
            Assertions.assertEquals("FrameworkModel is destroyed", e.getMessage(), StringUtils.toString(e));
        }
    }