@Override
    public void handlerPlugin(final PluginData pluginData) {
        Map<String, String> configMap = GsonUtils.getInstance().toObjectMap(pluginData.getConfig(), String.class);
        final String endpoint = Optional.ofNullable(configMap.get("endpoint")).orElse("");
        final String clientSecrect = Optional.ofNullable(configMap.get("client_secrect")).orElse("");
        final String clientId = Optional.ofNullable(configMap.get("client_id")).orElse("");
        String certificate = Optional.ofNullable(configMap.get("certificate")).orElse("");
        certificate = certificate.replace("\\n", "\n");
        String organization = Optional.ofNullable(configMap.get("organization-name")).orElse("");
        String application = Optional.ofNullable(configMap.get("application-name")).orElse("");
        CasdoorConfig casdoorConfig = new CasdoorConfig(endpoint, clientId, clientSecrect, certificate, organization, application);
        CasdoorAuthService casdoorAuthService = new CasdoorAuthService(casdoorConfig);
        Singleton.INST.single(CasdoorAuthService.class, casdoorAuthService);
    }
@Test
    public void handlerPlugin() {
        final PluginData pluginData = new PluginData("pluginId", "pluginName", "{\"organization-name\":\"test\",\"application-name\":\"app-test\",\"endpoint\":\"http://localhost:8000\",\"client_secrect\":\"a4209d412a33a842b7a9c05a3446e623cbb7262d\",\"client_id\":\"6e3a84154e73d1fb156a\",\"certificate\":\"-----BEGIN CERTIFICATE-----\\n\"}", "0", false, null);
        casdoorPluginDateHandlerTest.handlerPlugin(pluginData);
        CasdoorAuthService casdoorAuthService = Singleton.INST.get(CasdoorAuthService.class);
        String redirect = "http://localhost:9195/http/hi";
        assertEquals(casdoorAuthService.getSigninUrl(redirect), "http://localhost:8000/login/oauth/authorize?client_id=6e3a84154e73d1fb156a&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A9195%2Fhttp%2Fhi&scope=read&state=app-test");
    }