for (int i = 0; i < data.length; i++) {
ObjectName on = new ObjectName("test:type=Simple,query=" +
querySubString + ",name=" + i);
Simple s = new Simple(data[i][0]);
mbs.registerMBean(s, on);
QueryExp q = null;
switch (type) {
case 1:
q = Query.initialSubString(Query.attr("String"),
Query.value(substring));
break;
case 2:
q = Query.anySubString(Query.attr("String"),
Query.value(substring));
break;
case 3:
q = Query.finalSubString(Query.attr("String"),
Query.value(substring));
break;
}
q.setMBeanServer(mbs);
boolean r = q.apply(on);
System.out.print("Attribute Value = " +
mbs.getAttribute(on, "String"));
if (r && "OK".equals(data[i][type])) {
System.out.println(" OK");
} else if (!r && "KO".equals(data[i][type])) {