hwservicemanager unit tests

Just for lazy service logic now since it is a relatively complicated
state machine.

Bug: 123318663
Test: hwservicemanager_test
Change-Id: Ia3b3168b97107c1ff98e472e19b02db4f2a8ff3b
diff --git a/HidlService.h b/HidlService.h
index 2225000..7256b52 100644
--- a/HidlService.h
+++ b/HidlService.h
@@ -51,6 +51,7 @@
         nullptr,
         static_cast<pid_t>(IServiceManager::PidConstant::NO_PID))
     {}
+    virtual ~HidlService() {}
 
     /**
      * Note, getService() can be nullptr. This is because you can have a HidlService
@@ -79,6 +80,10 @@
     std::string string() const; // e.x. "android.hidl.manager@1.0::IServiceManager/manager"
     const std::set<pid_t> &getPassthroughClients() const;
 
+protected:
+    // mockable number of clients including hwservicemanager. -1 if not implemented or unavailable.
+    virtual ssize_t getNodeStrongRefCount();
+
 private:
     void sendRegistrationNotifications();
     void sendClientCallbackNotifications(bool hasClients);