assertTrue("Expected IllegalArgumentException for null implementation", caught);
caught = false;
try
{
new StandardMBean(new MyRunnable(), ArbitraryInterface.class);
}
catch (NotCompliantMBeanException e)
{
caught = true;
}
assertTrue("Expected NotCompliantMBeanException for the wrong management interface", caught);
caught = false;
try
{
new StandardMBean(new MyRunnable(), null);
}
catch (NotCompliantMBeanException e)
{
caught = true;
}