HMSResourceMonitor extends MonitorTask { public MonitoringTaskResponse call() throws Exception { return executeTask(); } HMSResourceMonitor();  HMSResourceMonitor( MonitoringTaskResponse response, ServerComponent component );  HMSResourceMonitor( MonitoringTaskResponse response ); MonitoringTaskResponse call(); MonitoringTaskResponse executeTask();  }
@Test public void test() { logger.info( "Testing HMSResourceMonitorTest" ); try { ServerNode node = new ServerNode(); node.setManagementIp( "xx.xx.xx.xx" ); node.setManagementUserName( "testuser" ); node.setManagementUserPassword( "testpass" ); IComponentEventInfoProvider boardService = new BoardServiceTest(); MonitoringTaskResponse response = new MonitoringTaskResponse( node, ServerComponent.MEMORY, boardService ); HMSResourceMonitor hmsResourceMonitor = new HMSResourceMonitor( response, ServerComponent.MEMORY ); hmsResourceMonitor.call(); assertNotNull( hmsResourceMonitor.response ); } catch ( Exception e ) { logger.info( "Testing HMSResourceMonitorTest Failed" ); e.printStackTrace(); } }