SiriClientSubscriptionManager implements StatusProviderService { public void handleHeartbeatNotification( HeartbeatNotificationStructure heartbeat) { _log.debug("hearbeat notification"); ClientSubscriptionChannel channel = _activeChannels.get(heartbeat.getAddress()); if (channel != null) _heartbeatManager.resetHeartbeat(channel, channel.getHeartbeatInterval()); }  @Inject void setSchedulingService(SchedulingService schedulingService); @Inject void setHeartbeatManager(HeartbeatManager heartbeatManager); void registerPendingSubscription(SiriClientRequest request,
      SubscriptionRequest subscriptionRequest); void clearPendingSubscription(SiriClientRequest request,
      SubscriptionRequest subscriptionRequest); void handleSubscriptionResponse(SubscriptionResponseStructure response); boolean isSubscriptionActive(SubscriptionId subscriptionId); boolean isSubscriptionActiveForModuleDelivery(
      AbstractServiceDeliveryStructure moduleDelivery); void recordServiceDeliveryStatistics(ServiceDelivery serviceDelivery); SiriChannelInfo getChannelInfoForServiceDelivery(
      ServiceDelivery serviceDelivery); void handleTerminateSubscriptionResponse(
      TerminateSubscriptionResponseStructure response); void terminateAllSubscriptions(
      boolean waitForTerminateSubscriptionResponseOnExit); void handleCheckStatusNotification(
      CheckStatusResponseStructure response); void handleHeartbeatNotification(
      HeartbeatNotificationStructure heartbeat); @Override void getStatus(Map<String, String> status);  }
@Test public void testHandleHeartbeatNotification() { SubscriptionResponseStructure response = new SubscriptionResponseStructure(); StatusResponseStructure status = new StatusResponseStructure(); SubscriptionId subscriptionId = new SubscriptionId("subscriberA", "subscriptionB"); ESiriModuleType moduleType = ESiriModuleType.VEHICLE_MONITORING; SiriClientRequest originalSubscriptionRequest = new SiriClientRequest(); originalSubscriptionRequest.setTargetUrl("http: originalSubscriptionRequest.setHeartbeatInterval(30); _manager.upgradePendingSubscription(response, status, subscriptionId, moduleType, originalSubscriptionRequest); HeartbeatNotificationStructure heartbeat = new HeartbeatNotificationStructure(); heartbeat.setAddress("http: _manager.handleHeartbeatNotification(heartbeat); Mockito.verify(_heartbeatManager).resetHeartbeat( Mockito.any(ClientSubscriptionChannel.class), Mockito.eq(30)); }