void () { CustomComponentExtension.EP_NAME.getPoint().registerExtension( new CustomComponentExtensionWithSwingRenderer<String>("x") { @Override public @NotNull String serializeData(String s) { return s; } @Override public String deserializeData(@NotNull String data) { return data; } @Override public @NotNull JComponent render(String data, @NotNull Project project) { return new JLabel(data); } }, getTestRootDisposable()); CustomComponentExtension.EP_NAME.getPoint().registerExtension( new CustomComponentExtensionWithSwingRenderer<Void>("y") { @Override public @NotNull JComponent render(Void data, @NotNull Project project) { return new JButton("3"); } }, getTestRootDisposable()); MyInspection inspection = new MyInspection(); JComponent component = new UiDslOptPaneRenderer().render(inspection.getOptionController(), inspection.getOptionsPane(), getTestRootDisposable(), getProject()); JButton button = UIUtil.findComponentOfType(component, JButton.class); assertEquals("3", button.getText()); JLabel label = UIUtil.findComponentOfType(component, JLabel.class); assertEquals("2", label.getText()); }