@Override
    public Integer doCall() throws Exception {
        JsonObject pluginConfig = loadConfig();
        JsonObject plugins = pluginConfig.getMap("plugins");

        Object plugin = plugins.remove(name);
        if (plugin != null) {
            printer().printf("Plugin %s removed%n", name);
            saveConfig(pluginConfig);
        } else {
            printer().printf("Plugin %s not found in configuration%n", name);
        }

        return 0;
    }
@Test
    public void shouldDeletePlugin() throws Exception {
        PluginHelper.enable(PluginType.CAMEL_K);

        PluginDelete command = new PluginDelete(new CamelJBangMain().withPrinter(printer));
        command.name = "camel-k";
        command.doCall();

        Assertions.assertEquals("Plugin camel-k removed", printer.getOutput());

        Assertions.assertEquals("{\"plugins\":{}}", PluginHelper.getOrCreatePluginConfig().toJson());
    }