@@ -0,0 +1,1976 @@
+package org.jmeterplugins.repository;%0A%0Aimport junit.framework.AssertionFailedError;%0Aimport net.sf.json.*;%0Aimport org.junit.Test;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Paths;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class RepoTest %7B%0A    @Test%0A    public void testAll() throws IOException %7B%0A        String path = getClass().getProtectionDomain().getCodeSource().getLocation().getFile();%0A        String up = File.separator + %22..%22;%0A        String repos = path + up + up + up + File.separator + %22site%22 + File.separator + %22dat%22 + File.separator + %22repo%22;%0A        File dir = new File(repos);%0A        File%5B%5D files = dir.listFiles();%0A        List%3CString%3E problems = new ArrayList%3C%3E();%0A        for (File f : files) %7B%0A            System.out.println(%22Checking repo: %22 + f.getCanonicalPath());%0A            String content = new String(Files.readAllBytes(Paths.get(f.getAbsolutePath())), %22UTF-8%22);%0A            JSON json = JSONSerializer.toJSON(content, new JsonConfig());%0A            JSONArray list = (JSONArray) json;%0A            for (Object o : list) %7B%0A                JSONObject spec = (JSONObject) o;%0A                Plugin plugin = Plugin.fromJSON(spec);%0A                try %7B%0A                    System.out.println(%22Checking plugin: %22 + plugin);%0A                    plugin.setCandidateVersion(plugin.getMaxVersion());%0A%0A                    plugin.download(new GenericCallback%3CString%3E() %7B%0A                        @Override%0A                        public void notify(String s) %7B%0A                        %7D%0A                    %7D);%0A                %7D catch (Throwable e) %7B%0A                    problems.add(f.getName() + %22:%22 + plugin);%0A                    System.err.println(%22Problem with %22 + plugin);%0A                    e.printStackTrace(System.err);%0A                %7D%0A            %7D%0A        %7D%0A        if (problems.size() %3E 0) %7B%0A            throw new AssertionFailedError(problems.toString());%0A        %7D%0A    %7D%0A%0A%7D%0A

add repo consistency test