public static HeartbeatHandler createHeartbeatHandler(
ResourceResolverFactory resourceResolverFactory, String slingId,
AnnouncementRegistry topologyService,
ConnectorRegistry connectorRegistry, Config config, Repository repository, Scheduler scheduler)
throws Exception {
HeartbeatHandler heartbeatHandler = new HeartbeatHandler();
PrivateAccessor.setField(heartbeatHandler, "resourceResolverFactory",
resourceResolverFactory);
PrivateAccessor.setField(heartbeatHandler, "slingSettingsService",
MockFactory.mockSlingSettingsService(slingId));
PrivateAccessor.setField(heartbeatHandler, "announcementRegistry",