/**
* Test of attribute sample, type String
*/
@Test
public void sampleComposite() throws Exception {
MBeanSampler sampler = new MBeanSampler(0, 30000, "TEST") ;
MyPublisher publisher = new MyPublisher() ;
sampler.setPublisher(publisher);
String compNamePublishName = "compName";
sampler.addMBeanAttribute(BEAN_NAME,
"Composite",
"name",
GMetricType.STRING,
"bytes",
GMetricSlope.BOTH,
compNamePublishName);
String compIntPublishName = "compInt";
sampler.addMBeanAttribute(BEAN_NAME,
"Composite",
"integer",
GMetricType.STRING,
"bytes",
GMetricSlope.BOTH,
compIntPublishName);
String compDatePublishName = "compDate";
sampler.addMBeanAttribute(BEAN_NAME,
"Composite",
"date",
GMetricType.STRING,
"bytes",
GMetricSlope.BOTH,
compDatePublishName);
sampler.run();
assertEquals( ExampleComposite.STRING_VALUE,
publisher.getResult(compNamePublishName) );
assertEquals( "" + ExampleComposite.INT_VALUE,