unit-test: Test deleting entry on name change

Breaking off into a separate function enables easier unit testing of the
specific function

Testing: 97% coverage of processing.cpp

Change-Id: I08f229657a8f44230b711fabbae20fb403792637
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/src/test/util/association_objects.hpp b/src/test/util/association_objects.hpp
index 081f891..45b89d6 100644
--- a/src/test/util/association_objects.hpp
+++ b/src/test/util/association_objects.hpp
@@ -1,4 +1,5 @@
 #include "src/associations.hpp"
+#include "src/processing.hpp"
 
 const std::string DEFAULT_SOURCE_PATH = "/logging/entry/1";
 const std::string DEFAULT_DBUS_SVC = "xyz.openbmc_project.New.Interface";
@@ -45,3 +46,15 @@
     auto endpoints = std::get<endpointsPos>(iface);
     endpoints.push_back(EXTRA_ENDPOINT);
 }
+
+// Create a default interface_map_type with input values
+interface_map_type createInterfaceMap(
+    const std::string& path, const std::string& connection_name,
+    const boost::container::flat_set<std::string>& interface_names)
+{
+    boost::container::flat_map<std::string,
+                               boost::container::flat_set<std::string>>
+        connectionMap = {{connection_name, interface_names}};
+    interface_map_type interfaceMap = {{path, connectionMap}};
+    return interfaceMap;
+}