/**
* Exception should be thrown if in conf mlet text is empty
*/
public Result testEmptyConf() throws Exception {
try {
MBeanServer server = MBeanServerFactory.createMBeanServer();
MLet mlet = new MLet();
ObjectName name = new ObjectName("test:name=mlet");
server.registerMBean(mlet, name);
server.invoke(name, "getMBeansFromURL", new Object[] { MLET_URL
+ "empty.conf" }, new String[] { String.class.getName() });
} catch (MBeanException e) {
//e.printStackTrace();
return passed();
} catch (Exception exp) {
//exp.printStackTrace();
return failed("Unexpected Exception");
}
return failed("javax.management.MBeanException is absence");
}
TheMLetTagTest.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:freeVM
作者:
评论列表
文章目录