@Override
    public <T extends IExtGroupRealization<?>> void registerExtGroupRealization(T instance, String name) throws ExtensionException {
        if (name == null) {
            throw new ExtensionException("name can not be null");
        }

        if (instance == null) {
            throw new ExtensionTypeException("instance can not be null");
        }

        for (Class<?> clazz : instance.getClass().getInterfaces()) {
            if (clazz.isAnnotationPresent(ExtensionPoint.class)) {
                if (extensionInstances.containsKey(makeKey(clazz, name))) {
                    throw new ExtensionTypeException("instance " + clazz.getName() + " with name " + name + " already registered");
                }

                extensionInstances.put(makeKey(clazz, name), instance);
            }
        }
    }
@Test
    public void testDefaultExtGroupRealizationManager() throws ExtensionException {
        ExtensionException e;

        e = assertThrows(ExtensionException.class, () -> manager.registerExtGroupRealization(null, null));
        assertEquals("name can not be null", e.getMessage());

        e = assertThrows(ExtensionException.class, () -> manager.registerExtGroupRealization(null, "extGroupRealization"));
        assertEquals("instance can not be null", e.getMessage());

        manager.registerExtGroupRealization(new ExtGroupRealization1(), "ExtGroupRealization1");

        manager.registerExtGroupRealization(new ExtGroupRealization2(), "ExtGroupRealization2");

        e = assertThrows(ExtensionException.class, () -> manager.registerExtGroupRealization(new ExtGroupRealization3(), "ExtGroupRealization2"));

        assertEquals("instance io.github.xiaoshicae.extension.core.extension.ExtA with name ExtGroupRealization2 already registered", e.getMessage());
    }