/**
* Should throw exception on unknown type.
*
* @throws MBeanException
* the MBean exception
* @throws AttributeNotFoundException
* the attribute not found exception
* @throws ReflectionException
* the reflection exception
*/
@Test
public void shouldThrowExceptionOnUnknownType()
throws MBeanException, AttributeNotFoundException, ReflectionException {
try {
readJmx("jdbc.Statement.Invocations", "select");
Assert.fail("readJmx should have thrown an AttributeNotFoundException");
} catch (Exception e) {
assertThat(e.getClass().getSimpleName()).isEqualTo("AttributeNotFoundException");
}
}
JmxReporterTest.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:tqdev-metrics
作者:
评论列表
文章目录