@Override
    public ExtensionDirector getExtensionDirector() {
        return this;
    }
@Test
    void testInheritanceAndScope() {

        // Expecting:
        // 1. SPI extension only be created in ExtensionDirector which matched scope
        // 2. Child ExtensionDirector can get extension instance from parent
        // 3. Parent ExtensionDirector can't get extension instance from child

        ExtensionDirector fwExtensionDirector = FrameworkModel.defaultModel().getExtensionDirector();
        ExtensionDirector appExtensionDirector =
                new ExtensionDirector(fwExtensionDirector, ExtensionScope.APPLICATION, ApplicationModel.defaultModel());
        ExtensionDirector moduleExtensionDirector = new ExtensionDirector(
                appExtensionDirector,
                ExtensionScope.MODULE,
                ApplicationModel.defaultModel().getDefaultModule());

        // test module extension loader
        FooFrameworkService testFwSrvFromModule =
                moduleExtensionDirector.getExtension(FooFrameworkService.class, testFwSrvName);
        FooAppService testAppSrvFromModule = moduleExtensionDirector.getExtension(FooAppService.class, testAppSrvName);
        FooModuleService testMdSrvFromModule =
                moduleExtensionDirector.getExtension(FooModuleService.class, testMdSrvName);

        Assertions.assertNotNull(testFwSrvFromModule);
        Assertions.assertNotNull(testAppSrvFromModule);
        Assertions.assertNotNull(testMdSrvFromModule);

        // test app extension loader
        FooFrameworkService testFwSrvFromApp =
                appExtensionDirector.getExtension(FooFrameworkService.class, testFwSrvName);
        FooAppService testAppSrvFromApp = appExtensionDirector.getExtension(FooAppService.class, testAppSrvName);
        FooModuleService testMdSrvFromApp = appExtensionDirector.getExtension(FooModuleService.class, testMdSrvName);

        Assertions.assertSame(testFwSrvFromApp, testFwSrvFromModule);
        Assertions.assertSame(testAppSrvFromApp, testAppSrvFromModule);
        Assertions.assertNull(testMdSrvFromApp);

        // test framework extension loader
        FooFrameworkService testFwSrvFromFw =
                fwExtensionDirector.getExtension(FooFrameworkService.class, testFwSrvName);
        FooAppService testAppSrvFromFw = fwExtensionDirector.getExtension(FooAppService.class, testAppSrvName);
        FooModuleService testMdSrvFromFw = fwExtensionDirector.getExtension(FooModuleService.class, testMdSrvName);

        Assertions.assertSame(testFwSrvFromFw, testFwSrvFromApp);
        Assertions.assertNull(testAppSrvFromFw);
        Assertions.assertNull(testMdSrvFromFw);
    }