unit-test: Test need_to_introspect function

Testing: Verified 100% code coverage of processing.cpp

Change-Id: I5ebdebe3fdcecbf250a23754f8b5c7db81bfaaa3
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/src/processing.cpp b/src/processing.cpp
index 923e147..be7bf12 100644
--- a/src/processing.cpp
+++ b/src/processing.cpp
@@ -21,3 +21,19 @@
     wellKnown = it->second;
     return true;
 }
+
+bool needToIntrospect(const std::string& processName,
+                      const WhiteBlackList& whiteList,
+                      const WhiteBlackList& blackList)
+{
+    auto inWhitelist =
+        std::find_if(whiteList.begin(), whiteList.end(),
+                     [&processName](const auto& prefix) {
+                         return boost::starts_with(processName, prefix);
+                     }) != whiteList.end();
+
+    // This holds full service names, not prefixes
+    auto inBlacklist = blackList.find(processName) != blackList.end();
+
+    return inWhitelist && !inBlacklist;
+}