ComponentDescription[] agents = initializerService.getComponentDescriptions(nodeData.name, AGENT_INSERTION_POINT); assertEquals("Wrong number of agents", nodeData.agentData.length, agents.length); for (int i = 0; i < agents.length; i++) { String agentName = agents[i].getName(); String className = agents[i].getClassname(); AgentData agentData = nodeData.agentData[i]; assertEquals("Wrong agent name", agentData.name, agentName); assertEquals("Wrong agent class ", agentData.className, className); ComponentDescription[] plugins = initializerService.getComponentDescriptions(agentData.name, PLUGIN_INSERTION_POINT); assertEquals("Wrong number of plugins", agentData.pluginData.length, plugins.length); for (int j = 0; j < plugins.length; j++) { String pluginName = plugins[j].getName(); className = plugins[j].getClassname(); PluginData pluginData = agentData.pluginData[j]; assertEquals("Wrong plugin name", pluginData.name, pluginName); assertEquals("Wrong plugin class ", pluginData.className, className); Vector vParams = (Vector) plugins[j].getParameter(); String[] params = (String[]) vParams.toArray(new String[0]); assertEquals("Wrong number of parameters", pluginData.paramData.length, params.length); for (int k = 0; k < params.length; k++) { assertEquals("Wrong parameter value", pluginData.paramData[k], params[k]);
for (int k = 0; k < nodeData.length; k++) { ComponentDescription[] agents = initializerService.getComponentDescriptions(nodeData[k].name, AGENT_INSERTION_POINT); assertEquals("Wrong number of agents", nodeData[k].agentData.length, agents.length); for (int i = 0; i < agents.length; i++) { String agentName = agents[i].getName(); String className = agents[i].getClassname(); AgentData agentData = nodeData[k].agentData[i]; assertEquals("Wrong agent name", agentData.name, agentName); assertEquals("Wrong agent class ", agentData.className, className); ComponentDescription[] plugins = initializerService.getComponentDescriptions(agentData.name, PLUGIN_INSERTION_POINT); assertEquals("Wrong number of plugins", agentData.pluginData.length, plugins.length); for (int j = 0; j < plugins.length; j++) { String pluginName = plugins[j].getName(); className = plugins[j].getClassname(); PluginData pluginData = agentData.pluginData[j]; assertEquals("Wrong plugin name", pluginData.name, pluginName); assertEquals("Wrong plugin class ", pluginData.className, className); Vector vParams = (Vector) plugins[j].getParameter(); String[] params = (String[]) vParams.toArray(new String[0]); assertEquals("Wrong number of parameters", pluginData.paramData.length, params.length); for (int q = 0; q < params.length; q++) { assertEquals("Wrong parameter value", pluginData.paramData[q], params[q]); }
    private void checkCMT() throws SQLException, IOException, InitializerServiceException {        ComponentDescription[] agents =            initializerService.getComponentDescriptions(nodeData.name, AGENT_INSERTION_POINT);        assertEquals("Wrong number of agents", nodeData.agentData.length, agents.length);        for (int i = 0; i < agents.length; i++) {            String agentName = agents[i].getName();            String className = agents[i].getClassname();            AgentData agentData = nodeData.agentData[i];            assertEquals("Wrong agent name", agentData.name, agentName);            assertEquals("Wrong agent class ", agentData.className, className);            ComponentDescription[] plugins =                initializerService.getComponentDescriptions(agentData.name, PLUGIN_INSERTION_POINT);            assertEquals("Wrong number of plugins", agentData.pluginData.length, plugins.length);            for (int j = 0; j < plugins.length; j++) {                String pluginName = plugins[j].getName();                className = plugins[j].getClassname();                PluginData pluginData = agentData.pluginData[j];                assertEquals("Wrong plugin name", pluginData.name, pluginName);                assertEquals("Wrong plugin class ", pluginData.className, className);                Vector vParams = (Vector) plugins[j].getParameter();                String[] params = (String[]) vParams.toArray(new String[0]);                assertEquals("Wrong number of parameters", pluginData.paramData.length, params.length);                for (int k = 0; k < params.length; k++) {                    assertEquals("Wrong parameter value", pluginData.paramData[k], params[k]);                }            }        }    }