public class JmxMonitorTest extends AbstractTest {
@Test
public void testGetCpu() throws Exception {
JmxMonitor monitor = new JmxMonitor();
String nodeId = "someId";
InteractionProtocol protocol = mock(InteractionProtocol.class);
monitor.startMonitoring(nodeId, protocol);
Thread.sleep(1200);
verify(protocol, atLeastOnce()).setMetric(eq(nodeId), (MetricsRecord) anyObject());
}