@Override
    public SecretsPluginInfo pluginInfoFor(GoPluginDescriptor descriptor) {
        String pluginId = descriptor.id();

        return new SecretsPluginInfo(descriptor, securityConfigSettings(pluginId), image(pluginId));
    }
@Test
    public void shouldBuildPluginInfoWithSecuritySettings() {
        GoPluginDescriptor descriptor = GoPluginDescriptor.builder().id("plugin1").build();
        List<PluginConfiguration> pluginConfigurations = List.of(
                new PluginConfiguration("username", new Metadata(true, false)),
                new PluginConfiguration("password", new Metadata(true, true))
        );

        when(extension.getSecretsConfigMetadata(descriptor.id())).thenReturn(pluginConfigurations);
        when(extension.getSecretsConfigView(descriptor.id())).thenReturn("secrets_config_view");

        SecretsPluginInfo pluginInfo = new SecretsPluginInfoBuilder(extension).pluginInfoFor(descriptor);

        assertThat(pluginInfo.getSecretsConfigSettings(),
                is(new PluggableInstanceSettings(pluginConfigurations, new PluginView("secrets_config_view"))));
    }