*/
public void testClone()
{
try
{
MBeanOperationInfo info = new MBeanOperationInfo(
"MyOperation",
"This is a description.",
new MBeanParameterInfo[] {
new MBeanParameterInfo("FooParam", "java.lang.Object", "description"),
new MBeanParameterInfo("BarParam", "java.lang.String", "description")
},
"java.util.StringBuffer",
MBeanOperationInfo.ACTION_INFO
);
MBeanOperationInfo clone = (MBeanOperationInfo)info.clone();
assertTrue(clone.getDescription().equals("This is a description."));
assertTrue(clone.getName().equals("MyOperation"));
assertTrue(clone.getReturnType().equals("java.util.StringBuffer"));
assertTrue(clone.getSignature().length == 2);
assertTrue(clone.getImpact() == MBeanOperationInfo.ACTION_INFO);
assertTrue(clone.getSignature() [0].getName().equals("FooParam"));
assertTrue(clone.getSignature() [1].getName().equals("BarParam"));
assertTrue(clone.getSignature() [0].getDescription().equals("description"));
assertTrue(clone.getSignature() [1].getDescription().equals("description"));
assertTrue(clone.getSignature() [0].getType().equals("java.lang.Object"));
assertTrue(clone.getSignature() [1].getType().equals("java.lang.String"));
}
catch (AssertionFailedError e)
{
throw e;