void () { ExtensionsAreaImpl extensionsArea = new ExtensionsAreaImpl(new ExtensionPointImplTest.MyComponentManager()); int numEP = extensionsArea.getNameToPointMap().size(); registerInterfaceExtension(extensionsArea); final boolean[] removed = {true}; ExtensionPointImpl<Object> point = extensionsArea.getExtensionPoint(EXTENSION_POINT_NAME_1); point.addExtensionPointListener(new ExtensionPointListener<>() { @Override public void extensionAdded(@NotNull Object extension, @NotNull PluginDescriptor pluginDescriptor) { removed[0] = false; } @Override public void extensionRemoved(@NotNull Object extension, @NotNull PluginDescriptor pluginDescriptor) { removed[0] = true; } }, false, null); point.registerExtension(123); extensionsArea.unregisterExtensionPoint(EXTENSION_POINT_NAME_1); assertThat(extensionsArea.getNameToPointMap().size()).withFailMessage("Extension point should be removed").isEqualTo(numEP); assertThat(removed[0]).withFailMessage("Extension point disposed").isTrue(); }