@Override
    public boolean available(String pluginName) {
        if (StringUtils.isBlank(pluginName)) {
            return false;
        }
        PluginWrapper pluginWrapper = pluginManager.getPlugin(pluginName);
        if (pluginWrapper == null) {
            return false;
        }
        return PluginState.STARTED.equals(pluginWrapper.getPluginState());
    }
@Test
    void available() {
        assertThat(pluginFinder.available(null)).isFalse();

        boolean available = pluginFinder.available("fake-plugin");
        assertThat(available).isFalse();

        PluginWrapper mockPluginWrapper = Mockito.mock(PluginWrapper.class);
        when(haloPluginManager.getPlugin(eq("fake-plugin")))
            .thenReturn(mockPluginWrapper);

        when(mockPluginWrapper.getPluginState()).thenReturn(PluginState.RESOLVED);
        available = pluginFinder.available("fake-plugin");
        assertThat(available).isFalse();

        when(mockPluginWrapper.getPluginState()).thenReturn(PluginState.STARTED);
        available = pluginFinder.available("fake-plugin");
        assertThat(available).isTrue();
    }