@Override
    public boolean isPluginOfType(final String extension, String pluginId) {
        return goPluginOSGiFramework.hasReferenceFor(GoPlugin.class, pluginId, extension);
    }
@Test
    void shouldSayPluginIsOfGivenExtensionTypeWhenReferenceIsFound() {
        String pluginId = "plugin-id";
        String extensionType = "sample-extension";
        GoPluginIdentifier pluginIdentifier = new GoPluginIdentifier(extensionType, List.of("1.0"));
        final GoPlugin goPlugin = mock(GoPlugin.class);
        final GoPluginDescriptor descriptor = mock(GoPluginDescriptor.class);
        when(goPluginOSGiFramework.hasReferenceFor(GoPlugin.class, pluginId, extensionType)).thenReturn(true);

        lenient().doAnswer(invocationOnMock -> {
            ActionWithReturn<GoPlugin, GoPluginApiResponse> action = (ActionWithReturn<GoPlugin, GoPluginApiResponse>) invocationOnMock.getArguments()[2];
            return action.execute(goPlugin, descriptor);
        }).when(goPluginOSGiFramework).doOn(eq(GoPlugin.class), eq(pluginId), eq(extensionType), any(ActionWithReturn.class));
        lenient().when(goPlugin.pluginIdentifier()).thenReturn(pluginIdentifier);

        DefaultPluginManager pluginManager = new DefaultPluginManager(monitor, registry, goPluginOSGiFramework, jarChangeListener, pluginRequestProcessorRegistry, systemEnvironment, pluginLoader);
        assertThat(pluginManager.isPluginOfType(extensionType, pluginId)).isTrue();
    }