void () { ExtensionPoint<@NotNull Integer> extensionPoint = buildExtensionPoint(Integer.class); final boolean[] added = new boolean[1]; extensionPoint.registerExtension(123, disposable); //noinspection ConstantConditions assertThat(added[0]).isFalse(); extensionPoint.addExtensionPointListener(new ExtensionPointListener<Integer>() { @Override public void extensionAdded(@NotNull Integer extension, @NotNull PluginDescriptor pluginDescriptor) { added[0] = true; } }, true, null); assertThat(added[0]).isTrue(); }